diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-10 00:25:33 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-10 00:25:33 +0200 |
commit | 99eea645832d376a3b214b78a57adabf1fa96547 (patch) | |
tree | 523d1ade0aaa84b1ac0d9cda83a6e4b46f2a08d8 /t/t3200-branch.sh | |
parent | The third batch (diff) | |
parent | branch: add worktree info on verbose output (diff) | |
download | git-99eea645832d376a3b214b78a57adabf1fa96547.tar.xz git-99eea645832d376a3b214b78a57adabf1fa96547.zip |
Merge branch 'nb/branch-show-other-worktrees-head'
"git branch --list" learned to show branches that are checked out
in other worktrees connected to the same repository prefixed with
'+', similar to the way the currently checked out branch is shown
with '*' in front.
* nb/branch-show-other-worktrees-head:
branch: add worktree info on verbose output
branch: update output to include worktree info
ref-filter: add worktreepath atom
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-x | t/t3200-branch.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index e9d7084d19..411a70b0ce 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -206,18 +206,22 @@ test_expect_success 'git branch -M baz bam should succeed when baz is checked ou git worktree add -f bazdir2 baz && git branch -M baz bam && test $(git -C bazdir rev-parse --abbrev-ref HEAD) = bam && - test $(git -C bazdir2 rev-parse --abbrev-ref HEAD) = bam + test $(git -C bazdir2 rev-parse --abbrev-ref HEAD) = bam && + rm -r bazdir bazdir2 && + git worktree prune ' test_expect_success 'git branch -M baz bam should succeed within a worktree in which baz is checked out' ' git checkout -b baz && - git worktree add -f bazdir3 baz && + git worktree add -f bazdir baz && ( - cd bazdir3 && + cd bazdir && git branch -M baz bam && test $(git rev-parse --abbrev-ref HEAD) = bam ) && - test $(git rev-parse --abbrev-ref HEAD) = bam + test $(git rev-parse --abbrev-ref HEAD) = bam && + rm -r bazdir && + git worktree prune ' test_expect_success 'git branch -M master should work when master is checked out' ' @@ -804,7 +808,9 @@ test_expect_success 'test deleting branch without config' ' test_expect_success 'deleting currently checked out branch fails' ' git worktree add -b my7 my7 && test_must_fail git -C my7 branch -d my7 && - test_must_fail git branch -d my7 + test_must_fail git branch -d my7 && + rm -r my7 && + git worktree prune ' test_expect_success 'test --track without .fetch entries' ' |