summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Stephen Manz <smanz@alum.mit.edu>2021-07-11 00:27:18 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-07-14 09:29:36 -0700
commitf9365c0a24b9d2346a9b2b5a24e1fa02039f23e5 (patch)
treedf7ec297ed003cdc51d0affaf6465bd58107f46e /t
parentThe second batch (diff)
downloadtgif-f9365c0a24b9d2346a9b2b5a24e1fa02039f23e5.tar.xz
t2400: clean up '"add" worktree with lock' test
- remove unneeded `git rev-parse` which must have come from a copy-paste of another test - unlock the worktree with test_when_finished Signed-off-by: Stephen Manz <smanz@alum.mit.edu> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t2400-worktree-add.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh
index 96dfca1554..93d3795cab 100755
--- a/t/t2400-worktree-add.sh
+++ b/t/t2400-worktree-add.sh
@@ -67,8 +67,8 @@ test_expect_success '"add" worktree' '
'
test_expect_success '"add" worktree with lock' '
- git rev-parse HEAD >expect &&
git worktree add --detach --lock here-with-lock main &&
+ test_when_finished "git worktree unlock here-with-lock || :" &&
test -f .git/worktrees/here-with-lock/locked
'