Skip to content

Commit f9365c0

Browse files
SRManzgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 670b81a commit f9365c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t2400-worktree-add.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ test_expect_success '"add" worktree' '
6767
'
6868

6969
test_expect_success '"add" worktree with lock' '
70-
git rev-parse HEAD >expect &&
7170
git worktree add --detach --lock here-with-lock main &&
71+
test_when_finished "git worktree unlock here-with-lock || :" &&
7272
test -f .git/worktrees/here-with-lock/locked
7373
'
7474

0 commit comments

Comments
 (0)