Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-18 08:42:12 +0400
committerJunio C Hamano <gitster@pobox.com>2009-04-18 08:42:12 +0400
commita9b772a0116869f0f93e57ca0b49fd66325bb04a (patch)
tree21ff148b24d3a0239d5a68a647a6884569a4a5d2 /remote.c
parentbd15ef078afac3f0f147e815d3b85d6d2a48dd1a (diff)
parent45972ffbedf8175555434006595c71a5b0e643f1 (diff)
Merge branch 'bw/short-ref-strict'
* bw/short-ref-strict: remote.c: use shorten_unambiguous_ref rev-parse: --abbrev-ref option to shorten ref name for-each-ref: utilize core.warnAmbiguousRefs for :short-format shorten_unambiguous_ref(): add strict mode
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/remote.c b/remote.c
index e4c89b8b6d..41c5b59736 100644
--- a/remote.c
+++ b/remote.c
@@ -1461,11 +1461,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)
return 0;
base = branch->merge[0]->dst;
- if (!prefixcmp(base, "refs/remotes/")) {
- base += strlen("refs/remotes/");
- } else if (!prefixcmp(base, "refs/heads/")) {
- base += strlen("refs/heads/");
- }
+ base = shorten_unambiguous_ref(base, 0);
if (!num_theirs)
strbuf_addf(sb, "Your branch is ahead of '%s' "
"by %d commit%s.\n",