summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a45d346)
raw | patch | inline | side by side (parent: a45d346)
author | Michael J Gruber <git@drmicha.warpmail.net> | |
Thu, 16 Apr 2009 08:20:44 +0000 (10:20 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 18 Apr 2009 03:53:19 +0000 (20:53 -0700) |
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>
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>
remote.c | patch | blob | history |
diff --git a/remote.c b/remote.c
index a06761ace8a2566746a5ebeedf6b3075f625c47b..54230ad5585885c83ebde249e6325ebd68ef4ec6 100644 (file)
--- a/remote.c
+++ b/remote.c
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",