diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-02 14:24:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-02 14:24:07 -0700 |
commit | 75375ea337dcd5c3dc2f8f793d7c8a3ee59f5564 (patch) | |
tree | 114661f3320bd561d413e896890f5f347b10706a /t | |
parent | Merge branch 'es/format-patch-doc-hide-no-patch' into maint (diff) | |
parent | branch: fix shortening of non-remote symrefs (diff) | |
download | tgif-75375ea337dcd5c3dc2f8f793d7c8a3ee59f5564.tar.xz |
Merge branch 'jk/branch-shortening-funny-symrefs' into maint
A change back in version 2.7 to "git branch" broke display of a
symbolic ref in a non-standard place in the refs/ hierarchy (we
expect symbolic refs to appear in refs/remotes/*/HEAD to point at
the primary branch the remote has, and as .git/HEAD to point at the
branch we locally checked out).
* jk/branch-shortening-funny-symrefs:
branch: fix shortening of non-remote symrefs
Diffstat (limited to 't')
-rwxr-xr-x | t/t3203-branch-output.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index 4261403cf6..c6a3ccba1b 100755 --- a/t/t3203-branch-output.sh +++ b/t/t3203-branch-output.sh @@ -184,4 +184,16 @@ test_expect_success 'ambiguous branch/tag not marked' ' test_cmp expect actual ' +test_expect_success 'local-branch symrefs shortened properly' ' + git symbolic-ref refs/heads/ref-to-branch refs/heads/branch-one && + git symbolic-ref refs/heads/ref-to-remote refs/remotes/origin/branch-one && + cat >expect <<-\EOF && + ref-to-branch -> branch-one + ref-to-remote -> refs/remotes/origin/branch-one + EOF + git branch >actual.raw && + grep ref-to <actual.raw >actual && + test_cmp expect actual +' + test_done |