diff options
author | Jeff King <peff@peff.net> | 2012-05-21 18:19:28 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-22 13:31:03 -0700 |
commit | ed81c76bc3a9440e37b3512c9c2b742c6ca92c6f (patch) | |
tree | ca7c6cfddcf85dbc593d45d6f842980f3d538018 /remote.h | |
parent | 7db8d5370f070ab983e1bc3569380b8aca899c6d (diff) | |
download | git-ed81c76bc3a9440e37b3512c9c2b742c6ca92c6f.tar.gz |
add sorting infrastructure for list refs
Since we store lists of refs as linked lists, we can use
llist_mergesort to efficiently sort them.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.h')
-rw-r--r-- | remote.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -72,6 +72,8 @@ extern const struct refspec *tag_refspec; struct ref *alloc_ref(const char *name); struct ref *copy_ref(const struct ref *ref); struct ref *copy_ref_list(const struct ref *ref); +void sort_ref_list(struct ref **, int (*cmp)(const void *, const void *)); +int ref_compare_name(const void *, const void *); int check_ref_type(const struct ref *ref, int flags); |