aboutsummaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-21 18:19:28 -0400
committerJunio C Hamano <gitster@pobox.com>2012-05-22 13:31:03 -0700
commited81c76bc3a9440e37b3512c9c2b742c6ca92c6f (patch)
treeca7c6cfddcf85dbc593d45d6f842980f3d538018 /remote.h
parent7db8d5370f070ab983e1bc3569380b8aca899c6d (diff)
downloadgit-ed81c76bc3a9440e37b3512c9c2b742c6ca92c6f.tar.gz
git-ed81c76bc3a9440e37b3512c9c2b742c6ca92c6f.tar.xz
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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/remote.h b/remote.h
index 9ad8eb6cc..251d8fd96 100644
--- a/remote.h
+++ b/remote.h
@@ -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);