summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-08-06 11:23:04 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-08-06 16:33:24 +0200
commit8c1d5d4839419e6dca0b3fd66f17864c5e7d60e3 (patch)
tree5b15ff608e8d52d6b14e13fe9f2a7ab67dc04509 /src
parenta655cc3571206957991420089dc038bc5a04349b (diff)
downloadlibgit2-8c1d5d4839419e6dca0b3fd66f17864c5e7d60e3.tar.gz
Use the internal sort in the local transport
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src')
-rw-r--r--src/transport_local.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/transport_local.c b/src/transport_local.c
index 64ac183d1..bb3b10e10 100644
--- a/src/transport_local.c
+++ b/src/transport_local.c
@@ -14,14 +14,6 @@ typedef struct {
git_vector *refs;
} transport_local;
-static int cmp_refs(const void *a, const void *b)
-{
- const char *stra = *(const char * const *) a;
- const char *strb = *(const char * const *) b;
-
- return strcmp(stra, strb);
-}
-
/*
* Try to open the url as a git directory. The direction doesn't
* matter in this case because we're calulating the heads ourselves.
@@ -148,7 +140,7 @@ static int local_ls(git_transport *transport, git_headarray *array)
return error;
/* Sort the references first */
- qsort(refs.strings, refs.count, sizeof(char *), cmp_refs);
+ git__tsort((void **)refs.strings, refs.count, (git_vector_cmp) strcmp);
/* Add HEAD */
error = add_ref(GIT_HEAD_FILE, repo, vec);