diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-12-19 11:46:18 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-12-19 11:46:18 +0900 |
| commit | 963f8d3b63a8a998b2109eeb5c81c612b4ec74f2 (patch) | |
| tree | 12ece44672087879da6fb9dc70ee82f9af8b78ae /t | |
| parent | f3d9bc801a68ba3b23a4ce6e5139931b7840ca46 (diff) | |
| parent | cfbd173ccb4dbf9cbaae0640b17d96d7b2ee5a19 (diff) | |
| download | git-963f8d3b63a8a998b2109eeb5c81c612b4ec74f2.tar.xz | |
Merge branch 'rj/branch-copy-and-rename'
Fix a pair of bugs in 'git branch'.
* rj/branch-copy-and-rename:
branch: force-copy a branch to itself via @{-1} is a no-op
Diffstat (limited to 't')
| -rwxr-xr-x | t/t3204-branch-name-interpretation.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh index 793bf4d269..3399344f25 100755 --- a/t/t3204-branch-name-interpretation.sh +++ b/t/t3204-branch-name-interpretation.sh @@ -57,6 +57,16 @@ test_expect_success 'create branch with pseudo-qualified name' ' expect_branch refs/heads/refs/heads/qualified two ' +test_expect_success 'force-copy a branch to itself via @{-1} is no-op' ' + git branch -t copiable main && + git checkout copiable && + git checkout - && + git branch -C @{-1} copiable && + git config --get-all branch.copiable.merge >actual && + echo refs/heads/main >expect && + test_cmp expect actual +' + test_expect_success 'delete branch via @{-1}' ' git branch previous-del && |
