зеркало из https://github.com/microsoft/git.git
decoration: do not mis-decorate refs with same prefix
We definitely do not want to decorate refs/headsandtails the same as refs/heads/*, for example. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
f696543dad
Коммит
594ffe80e7
|
@ -95,11 +95,11 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!prefixcmp(refname, "refs/heads"))
|
if (!prefixcmp(refname, "refs/heads/"))
|
||||||
type = DECORATION_REF_LOCAL;
|
type = DECORATION_REF_LOCAL;
|
||||||
else if (!prefixcmp(refname, "refs/remotes"))
|
else if (!prefixcmp(refname, "refs/remotes/"))
|
||||||
type = DECORATION_REF_REMOTE;
|
type = DECORATION_REF_REMOTE;
|
||||||
else if (!prefixcmp(refname, "refs/tags"))
|
else if (!prefixcmp(refname, "refs/tags/"))
|
||||||
type = DECORATION_REF_TAG;
|
type = DECORATION_REF_TAG;
|
||||||
else if (!prefixcmp(refname, "refs/stash"))
|
else if (!prefixcmp(refname, "refs/stash"))
|
||||||
type = DECORATION_REF_STASH;
|
type = DECORATION_REF_STASH;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче