git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 1/3] t2400: clean up '"add" worktree with lock' test

From
SGStephen Manz via GitGitGadget <gitgitgadget@gmail.com>
Date
Jul 15, 2021, 02:32 UTC
Message-ID
<5618933279dadf48ba51b79fc11beec8c163820e.1626316350.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.992.v4.git.1626316350.gitgitgadget@gmail.com>
From: Stephen Manz <smanz@alum.mit.edu>
- 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>
---
 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
Previous: Stephen Manz via GitGitGadgetNext: Stephen Manz via GitGitGadget
Message 23 of 27 in “worktree: teach `add` to accept --reason <string> with --lock”
  1. worktree: teach `add` to accept --reason <string> with --lockStephen Manz via GitGitGadget, Jul 6, 2021
  2. Eric SunshineJul 6, 2021
  3. Junio C HamanoJul 6, 2021
  4. Eric SunshineJul 9, 2021
  5. Junio C HamanoJul 9, 2021
  6. Eric SunshineJul 10, 2021
  7. 0/3 worktree: teach add to accept --reason with --lockStephen Manz via GitGitGadget, Jul 8, 2021
  8. 1/3 t2400: remove unneeded `git rev-parse` from '"add" worktree with lock' testStephen Manz via GitGitGadget, Jul 8, 2021
  9. 2/3 worktree: default lock string should be marked with `_()` for translationStephen Manz via GitGitGadget, Jul 8, 2021
  10. Eric SunshineJul 9, 2021
  11. Junio C HamanoJul 9, 2021
  12. 3/3 worktree: teach `add` to accept --reason <string> with --lockStephen Manz via GitGitGadget, Jul 8, 2021
  13. Eric SunshineJul 9, 2021
  14. Junio C HamanoJul 9, 2021
  15. Eric SunshineJul 10, 2021
  16. 0/3 worktree: teach add to accept --reason with --lockStephen Manz via GitGitGadget, Jul 11, 2021
  17. 2/3 worktree: mark lock strings with `_()` for translationStephen Manz via GitGitGadget, Jul 11, 2021
  18. 1/3 t2400: clean up '"add" worktree with lock' testStephen Manz via GitGitGadget, Jul 11, 2021
  19. 3/3 worktree: teach `add` to accept --reason <string> with --lockStephen Manz via GitGitGadget, Jul 11, 2021
  20. Eric SunshineJul 13, 2021
  21. Eric SunshineJul 13, 2021
  22. 0/3 worktree: teach add to accept --reason with --lockStephen Manz via GitGitGadget, Jul 15, 2021
  23. 1/3 t2400: clean up '"add" worktree with lock' testStephen Manz via GitGitGadget, Jul 15, 2021
  24. 2/3 worktree: mark lock strings with `_()` for translationStephen Manz via GitGitGadget, Jul 15, 2021
  25. 3/3 worktree: teach `add` to accept --reason <string> with --lockStephen Manz via GitGitGadget, Jul 15, 2021
  26. Eric SunshineJul 15, 2021
  27. Eric SunshineJul 17, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.