diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-01-29 13:18:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-29 13:18:51 -0800 |
commit | 02a20d1038d965ffaef3604f00afcce0e88abccb (patch) | |
tree | 491264573ac0dbae744e6943b831e54cfd949bf6 | |
parent | Merge branch 'jn/gitweb-unspecified-action' (diff) | |
parent | Fix incorrect ref namespace check (diff) | |
download | tgif-02a20d1038d965ffaef3604f00afcce0e88abccb.tar.xz |
Merge branch 'nd/maint-refname-in-hierarchy-check'
* nd/maint-refname-in-hierarchy-check:
Fix incorrect ref namespace check
-rw-r--r-- | builtin/fetch.c | 2 | ||||
-rw-r--r-- | builtin/remote.c | 2 | ||||
-rw-r--r-- | log-tree.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 0481c169ca..ab186332fa 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -585,7 +585,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; /* diff --git a/builtin/remote.c b/builtin/remote.c index 583eec90e0..f54a89adc7 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -534,7 +534,7 @@ static int add_branch_for_removal(const char *refname, } /* don't delete non-remote-tracking refs */ - if (prefixcmp(refname, "refs/remotes")) { + if (prefixcmp(refname, "refs/remotes/")) { /* advise user how to delete local branches */ if (!prefixcmp(refname, "refs/heads/")) string_list_append(branches->skipped, diff --git a/log-tree.c b/log-tree.c index c719a6e385..cea8756866 100644 --- a/log-tree.c +++ b/log-tree.c @@ -120,9 +120,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) |