summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-01-05 19:39:40 +0700
committerJunio C Hamano <gitster@pobox.com>2012-01-11 12:52:12 -0800
commit97ba642bcf918de028b2e77165c5210cf3f462e5 (patch)
tree7e9e06846d27d3ddcbbf0328b97c52a943e444d0 /log-tree.c
parent8311158c66e0d83df950ea837fb1cb332c51f798 (diff)
downloadgit-97ba642bcf918de028b2e77165c5210cf3f462e5.tar.gz
Fix incorrect ref namespace checknd/maint-refname-in-hierarchy-check
The reason why the trailing slash is needed is obvious. refs/stash and HEAD are not namespace, but complete refs. Do full string compare on them. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c
index e7694a3a4c..21ac9047c0 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -119,9 +119,9 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in
type = DECORATION_REF_REMOTE;
else if (!prefixcmp(refname, "refs/tags/"))
type = DECORATION_REF_TAG;
- else if (!prefixcmp(refname, "refs/stash"))
+ else if (!strcmp(refname, "refs/stash"))
type = DECORATION_REF_STASH;
- else if (!prefixcmp(refname, "HEAD"))
+ else if (!strcmp(refname, "HEAD"))
type = DECORATION_REF_HEAD;
if (!cb_data || *(int *)cb_data == DECORATE_SHORT_REFS)