提交 3eb96997 编写于 作者: C Clemens Buchacher 提交者: Junio C Hamano

fetch: do not create ref from empty name

Previously, the refspec "<src>:" would be expanded to
"<src>:refs/heads/". Instead, treat an empty <dst> just like refspecs
without a colon.
Signed-off-by: NClemens Buchacher <drizzd@aon.at>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 50a991ec
......@@ -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/"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册