X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fshow-ref.c;h=be9b512eebc72984e6ff4cdd4859ab7951539e19;hb=183113a5ca99cb228b2ba0a29e53f1ac11f2c7c2;hp=17ada88dfb9543ba782b84507b451fabfec28e10;hpb=b7d0da858bb2f22c6ef3dbb20c1ded0302f4eaca;p=git.git diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 17ada88df..be9b512ee 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -105,7 +105,7 @@ match: static int add_existing(const char *refname, const unsigned char *sha1, int flag, void *cbdata) { struct string_list *list = (struct string_list *)cbdata; - string_list_insert(refname, list); + string_list_insert(list, refname); return 0; } @@ -120,7 +120,7 @@ static int add_existing(const char *refname, const unsigned char *sha1, int flag */ static int exclude_existing(const char *match) { - static struct string_list existing_refs = { NULL, 0, 0, 0 }; + static struct string_list existing_refs = STRING_LIST_INIT_NODUP; char buf[1024]; int matchlen = match ? strlen(match) : 0;