aboutsummaryrefslogtreecommitdiff
path: root/builtin-branch.c
diff options
context:
space:
mode:
authorBert Wesarg <bert.wesarg@googlemail.com>2009-04-13 12:25:46 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-13 09:36:44 -0700
commit6e7b3309d356077337b8222683a743c27fa7276c (patch)
tree64b2fc3c755697457c22b3eb5b121707a16c395b /builtin-branch.c
parentf800b65bea1504299747e7be03ee279508a74e1f (diff)
downloadgit-6e7b3309d356077337b8222683a743c27fa7276c.tar.gz
git-6e7b3309d356077337b8222683a743c27fa7276c.tar.xz
shorten_unambiguous_ref(): add strict mode
Add the strict mode of abbreviation to shorten_unambiguous_ref(), i.e. the resulting ref won't trigger the ambiguous ref warning. All users of shorten_unambiguous_ref() still use the loose mode. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-branch.c')
-rw-r--r--builtin-branch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-branch.c b/builtin-branch.c
index 327582169..91098ca9b 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -311,14 +311,14 @@ static void fill_tracking_info(struct strbuf *stat, const char *branch_name,
if (branch && branch->merge && branch->merge[0]->dst &&
show_upstream_ref)
strbuf_addf(stat, "[%s] ",
- shorten_unambiguous_ref(branch->merge[0]->dst));
+ shorten_unambiguous_ref(branch->merge[0]->dst, 0));
return;
}
strbuf_addch(stat, '[');
if (show_upstream_ref)
strbuf_addf(stat, "%s: ",
- shorten_unambiguous_ref(branch->merge[0]->dst));
+ shorten_unambiguous_ref(branch->merge[0]->dst, 0));
if (!ours)
strbuf_addf(stat, "behind %d] ", theirs);
else if (!theirs)