]> git.ipfire.org Git - thirdparty/git.git/blobdiff - remote.c
Sync with 1.6.2.4
[thirdparty/git.git] / remote.c
index e4c89b8b6d255a781708a035e90de0c68e233f7f..41c5b59736e7c470f5bd1a52ffaf4cd547238994 100644 (file)
--- 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",