From: Clemens Buchacher Date: Wed, 17 Jun 2009 13:38:36 +0000 (+0200) Subject: fetch: do not create ref from empty name X-Git-Tag: v1.6.4-rc0~13^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3eb9699733355d27fd5442492d66ec3c759e0c8b;p=git.git fetch: do not create ref from empty name Previously, the refspec ":" would be expanded to ":refs/heads/". Instead, treat an empty just like refspecs without a colon. Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- diff --git a/remote.c b/remote.c index d66e2f3c9..39583d52b 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/"))