summaryrefslogtreecommitdiff
path: root/t/t2402-worktree-list.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-03-05 10:43:02 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-03-05 10:43:03 -0800
commit4a2e91db652e197803c6f29e2c2f1c9dfbc16506 (patch)
treeabae7a1c8eb6eeb0d57f561725122341c3e07fe7 /t/t2402-worktree-list.sh
parentMerge branch 'es/worktree-avoid-duplication-fix' (diff)
parentt2402: test worktree path when called in .git directory (diff)
downloadtgif-4a2e91db652e197803c6f29e2c2f1c9dfbc16506.tar.xz
Merge branch 'hv/receive-denycurrent-everywhere'
"git push" should stop from updating a branch that is checked out when receive.denyCurrentBranch configuration is set, but it failed to pay attention to checkouts in secondary worktrees. This has been corrected. * hv/receive-denycurrent-everywhere: t2402: test worktree path when called in .git directory receive.denyCurrentBranch: respect all worktrees t5509: use a bare repository for test push target get_main_worktree(): allow it to be called in the Git directory
Diffstat (limited to 't/t2402-worktree-list.sh')
-rwxr-xr-xt/t2402-worktree-list.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh
index bb6fb9b12c..69ffe865b4 100755
--- a/t/t2402-worktree-list.sh
+++ b/t/t2402-worktree-list.sh
@@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '
test_cmp expected sorted/main/actual
'
+test_expect_success 'worktree path when called in .git directory' '
+ git worktree list >list1&&
+ git -C .git worktree list >list2 &&
+ test_cmp list1 list2
+'
+
test_done