mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-24 21:28:06 +00:00
transport: Wrap strcmp
We don't want direct pointers to the CRT on Windows, we may get stdcall conflicts.
This commit is contained in:
parent
a41bf61222
commit
09df3f2c0f
@ -14,6 +14,13 @@ typedef struct {
|
||||
git_vector *refs;
|
||||
} transport_local;
|
||||
|
||||
static int cmp_refs(const void *a, const void *b)
|
||||
{
|
||||
const char *stra = (const char *)a;
|
||||
const char *strb = (const char *)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.
|
||||
@ -140,7 +147,7 @@ static int local_ls(git_transport *transport, git_headarray *array)
|
||||
return error;
|
||||
|
||||
/* Sort the references first */
|
||||
git__tsort((void **)refs.strings, refs.count, (git_vector_cmp) strcmp);
|
||||
git__tsort((void **)refs.strings, refs.count, &cmp_refs);
|
||||
|
||||
/* Add HEAD */
|
||||
error = add_ref(GIT_HEAD_FILE, repo, vec);
|
||||
|
Loading…
Reference in New Issue
Block a user