Skip to content

Commit

Permalink
t2400: clean up '"add" worktree with lock' test
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
SRManz authored and gitster committed Jul 14, 2021
1 parent 670b81a commit f9365c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t2400-worktree-add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'

Expand Down

0 comments on commit f9365c0

Please sign in to comment.