summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-07-08 09:52:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-07-08 09:52:25 -0700
commit49902bd8561392e979c54344ae98dfab7a7ecf05 (patch)
treeace37e931765c22a4c2f7d12e651d49e90b073bd
parentMerge branch 'cf/maint-remote-uploadpack-useconfig-fix' into maint (diff)
parentfetch: do not create ref from empty name (diff)
downloadtgif-49902bd8561392e979c54344ae98dfab7a7ecf05.tar.xz
Merge branch 'cb/maint-fetch-refspec-wo-dst' into maint
* cb/maint-fetch-refspec-wo-dst: fetch: do not create ref from empty name
-rw-r--r--remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index d66e2f3c93..39583d52b9 100644
--- a/remote.c
+++ b/remote.c
@@ -1254,7 +1254,7 @@ struct ref *get_remote_ref(const struct ref *remote_refs, const char *name)
static struct ref *get_local_ref(const char *name)
{
- if (!name)
+ if (!name || name[0] == '\0')
return NULL;
if (!prefixcmp(name, "refs/"))