Skip to content

Commit 49902bd

Browse files
committed
Merge branch 'cb/maint-fetch-refspec-wo-dst' into maint
* cb/maint-fetch-refspec-wo-dst: fetch: do not create ref from empty name
2 parents b13493b + 3eb9699 commit 49902bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ struct ref *get_remote_ref(const struct ref *remote_refs, const char *name)
12541254

12551255
static struct ref *get_local_ref(const char *name)
12561256
{
1257-
if (!name)
1257+
if (!name || name[0] == '\0')
12581258
return NULL;
12591259

12601260
if (!prefixcmp(name, "refs/"))

0 commit comments

Comments
 (0)