From: Michael J Gruber Date: Thu, 16 Apr 2009 08:20:44 +0000 (+0200) Subject: remote.c: use shorten_unambiguous_ref X-Git-Tag: v1.6.3-rc1~12^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=45972ffbedf8175555434006595c71a5b0e643f1;p=git.git remote.c: use shorten_unambiguous_ref Use the new shorten_unambiguous_ref() for simplifying the output of upstream branch names. This affects status and checkout. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- diff --git a/remote.c b/remote.c index a06761ace..54230ad55 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",