Skip to content

Commit

Permalink
remote.c: use shorten_unambiguous_ref
Browse files Browse the repository at this point in the history
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 <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Apr 18, 2009
1 parent a45d346 commit 45972ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 45972ff

Please sign in to comment.