X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fshow-ref.c;h=be9b512eebc72984e6ff4cdd4859ab7951539e19;hb=0c61c6de3497900616b66a65dc41b27544131ed5;hp=17ada88dfb9543ba782b84507b451fabfec28e10;hpb=878bd809d7c879f1a9ea00bdb4cb97d846ef4e93;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;