summaryrefslogtreecommitdiff
path: root/builtin/show-ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/show-ref.c')
-rw-r--r--builtin/show-ref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 17ada88..be9b512 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;