From: Stephen Manz via GitGitGadget Date: Thu, 15 Jul 2021 02:32:28 GMT Subject: [PATCH v4 1/3] t2400: clean up '"add" worktree with lock' test Message-ID: <5618933279dadf48ba51b79fc11beec8c163820e.1626316350.git.gitgitgadget@gmail.com> In-Reply-To: From: Stephen Manz - 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 --- t/t2400-worktree-add.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh index 96dfca15542..93d3795cab9 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 ' -- gitgitgadget