remote: improve sorting of "configure for git push" list
authorJeff King <redacted>
Sun, 22 Mar 2009 08:59:20 +0000 (04:59 -0400)
committerJunio C Hamano <redacted>
Sun, 22 Mar 2009 17:20:04 +0000 (10:20 -0700)
commit48ef563641d1904f8da2c6fffe700fe6276af8dd
treef86a449fed3e290446d1ea68f2922dd34ee0d259
parent8321c56b6bae25a2d70790f452df894be536b32c
remote: improve sorting of "configure for git push" list

The data structure used to store this list is a string_list
of sources with the destination in the util member. The
current code just sorts on the source; if a single source is
pushed to two different destination refs at a remote, then
the order in which they are printed is non-deterministic.

This patch implements a comparison using both fields.
Besides being a little nicer on the eyes, giving a stable
sort prevents false negatives in the test suite when
comparing output.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin-remote.c
git clone https://git.99rst.org/PROJECT