summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-07-06 09:39:38 -0700
committerJunio C Hamano <gitster@pobox.com>2009-07-06 09:39:38 -0700
commit864cd9491772367b3ce5b0dda98f068e5bd49680 (patch)
treeb4ad69fb8da9d1cfdda2aab7a35f091fe3ec3908 /remote.c
parentea1b9b948da8ec3fec186d56e0b33ee07842601a (diff)
parent3eb9699733355d27fd5442492d66ec3c759e0c8b (diff)
downloadgit-864cd9491772367b3ce5b0dda98f068e5bd49680.tar.gz
Merge branch 'cb/maint-fetch-refspec-wo-dst'
* cb/maint-fetch-refspec-wo-dst: fetch: do not create ref from empty name
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index 733ba57494..c3ada2d72b 100644
--- a/remote.c
+++ b/remote.c
@@ -1277,7 +1277,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/"))