Skip to content

Commit 864cd94

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

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
@@ -1277,7 +1277,7 @@ struct ref *get_remote_ref(const struct ref *remote_refs, const char *name)
12771277

12781278
static struct ref *get_local_ref(const char *name)
12791279
{
1280-
if (!name)
1280+
if (!name || name[0] == '\0')
12811281
return NULL;
12821282

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

0 commit comments

Comments
 (0)