remote: improve sorting of "configure for git push" list
commit20213ddd23407dc127e499cd59bc1b17989a90d1
authorJeff King <peff@peff.net>
Sun, 22 Mar 2009 08:59:20 +0000 (22 04:59 -0400)
committerJohannes Sixt <j6t@kdbg.org>
Mon, 23 Mar 2009 08:59:18 +0000 (23 09:59 +0100)
treec12a5b6b18b9f40adb3c20932c51b7c3c1aad4fc
parentd4eb98cedebe98918b58b30f19b216831098199e
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 <peff@peff.net>
builtin-remote.c