summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-01-05 12:39:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-01-11 20:52:12 (GMT)
commit97ba642bcf918de028b2e77165c5210cf3f462e5 (patch)
tree7e9e06846d27d3ddcbbf0328b97c52a943e444d0 /builtin/fetch.c
parent8311158c66e0d83df950ea837fb1cb332c51f798 (diff)
downloadgit-97ba642bcf918de028b2e77165c5210cf3f462e5.zip
git-97ba642bcf918de028b2e77165c5210cf3f462e5.tar.gz
git-97ba642bcf918de028b2e77165c5210cf3f462e5.tar.bz2
Fix incorrect ref namespace 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 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 8761a33..ea45cb0 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -574,7 +574,7 @@ static void find_non_local_tags(struct transport *transport,
for_each_ref(add_existing, &existing_refs);
for (ref = transport_get_remote_refs(transport); ref; ref = ref->next) {
- if (prefixcmp(ref->name, "refs/tags"))
+ if (prefixcmp(ref->name, "refs/tags/"))
continue;
/*