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

[PATCH 02/10] t9801: use `--` in preparation for default branch rename

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 19, 2020, 19:31 UTC
Message-ID
<5849eda331e09732026f0432cf1040a4e973a702.1603135902.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.758.git.1603135902.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Seeing as we want to use `main` as the new default branch name used by `git init`, and that `main` is used as directory name in t9801, let's tighten the rev-list arguments to make it explicit when we are referring to a ref instead of a directory.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9801-git-p4-branch.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh
index 67ff2711f5..a3abd778f9 100755
--- a/t/t9801-git-p4-branch.sh
+++ b/t/t9801-git-p4-branch.sh
@@ -67,7 +67,7 @@ test_expect_success 'import main, no branch detection' '
 	(
 		cd "$git" &&
 		git log --oneline --graph --decorate --all &&
-		git rev-list master >wc &&
+		git rev-list master -- >wc &&
 		test_line_count = 4 wc
 	)
 '
@@ -78,7 +78,7 @@ test_expect_success 'import branch1, no branch detection' '
 	(
 		cd "$git" &&
 		git log --oneline --graph --decorate --all &&
-		git rev-list master >wc &&
+		git rev-list master -- >wc &&
 		test_line_count = 2 wc
 	)
 '
@@ -89,7 +89,7 @@ test_expect_success 'import branch2, no branch detection' '
 	(
 		cd "$git" &&
 		git log --oneline --graph --decorate --all &&
-		git rev-list master >wc &&
+		git rev-list master -- >wc &&
 		test_line_count = 2 wc
 	)
 '
@@ -100,7 +100,7 @@ test_expect_success 'import depot, no branch detection' '
 	(
 		cd "$git" &&
 		git log --oneline --graph --decorate --all &&
-		git rev-list master >wc &&
+		git rev-list master -- >wc &&
 		test_line_count = 8 wc
 	)
 '
@@ -114,7 +114,7 @@ test_expect_success 'import depot, branch detection' '
 		git log --oneline --graph --decorate --all &&
 
 		# 4 main commits
-		git rev-list master >wc &&
+		git rev-list master -- >wc &&
 		test_line_count = 4 wc &&
 
 		# 3 main, 1 integrate, 1 on branch2
@@ -137,7 +137,7 @@ test_expect_success 'import depot, branch detection, branchList branch definitio
 		git log --oneline --graph --decorate --all &&
 
 		# 4 main commits
-		git rev-list master >wc &&
+		git rev-list master -- >wc &&
 		test_line_count = 4 wc &&
 
 		# 3 main, 1 integrate, 1 on branch2
-- 
gitgitgadget
Previous: Johannes SchindelinNext: Junio C Hamano
Message 5 of 35 in “Prepare for changing the default branch name main (last manual part)”
  1. 00/10 Prepare for changing the default branch name main (last manual part)Johannes Schindelin via GitGitGadget, Oct 19, 2020
  2. 01/10 fmt-merge-msg: also suppress "into main" by defaultJohannes Schindelin via GitGitGadget, Oct 19, 2020
  3. Junio C HamanoOct 21, 2020
  4. Johannes SchindelinOct 22, 2020
  5. 02/10 t9801: use `--` in preparation for default branch renameJohannes Schindelin via GitGitGadget, Oct 19, 2020
  6. Junio C HamanoOct 21, 2020
  7. 03/10 tests: start moving to a different default main branch nameJohannes Schindelin via GitGitGadget, Oct 19, 2020
  8. Junio C HamanoOct 21, 2020
  9. 05/10 t6200: adjust suppression pattern to also match "main"Johannes Schindelin via GitGitGadget, Oct 19, 2020
  10. Junio C HamanoOct 21, 2020
  11. Johannes SchindelinOct 22, 2020
  12. 06/10 t5703: adjust a test case for the upcoming default branch nameJohannes Schindelin via GitGitGadget, Oct 19, 2020
  13. Junio C HamanoOct 21, 2020
  14. 07/10 t3200: prepare for `main` being shorter than `master`Johannes Schindelin via GitGitGadget, Oct 19, 2020
  15. Junio C HamanoOct 21, 2020
  16. Johannes SchindelinOct 22, 2020
  17. 04/10 t4013: prepare for the new default branch name "main"Johannes Schindelin via GitGitGadget, Oct 19, 2020
  18. Junio C HamanoOct 21, 2020
  19. Johannes SchindelinOct 22, 2020
  20. 09/10 tests: prepare aligned mentions of the default branch nameJohannes Schindelin via GitGitGadget, Oct 19, 2020
  21. 08/10 t9902: prepare a test for the upcoming default branch nameJohannes Schindelin via GitGitGadget, Oct 19, 2020
  22. 10/10 t1400: prepare for `main` being default branch nameJohannes Schindelin via GitGitGadget, Oct 19, 2020
  23. Junio C HamanoOct 21, 2020
  24. Johannes SchindelinOct 22, 2020
  25. 0/9 Prepare for changing the default branch name main (last manual part)Johannes Schindelin via GitGitGadget, Oct 23, 2020
  26. 1/9 fmt-merge-msg: also suppress "into main" by defaultJohannes Schindelin via GitGitGadget, Oct 23, 2020
  27. 2/9 t9801: use `--` in preparation for default branch renameJohannes Schindelin via GitGitGadget, Oct 23, 2020
  28. 3/9 tests: start moving to a different default main branch nameJohannes Schindelin via GitGitGadget, Oct 23, 2020
  29. 4/9 t6200: adjust suppression pattern to also match "main"Johannes Schindelin via GitGitGadget, Oct 23, 2020
  30. 7/9 t9902: prepare a test for the upcoming default branch nameJohannes Schindelin via GitGitGadget, Oct 23, 2020
  31. 6/9 t3200: prepare for `main` being shorter than `master`Johannes Schindelin via GitGitGadget, Oct 23, 2020
  32. 5/9 t5703: adjust a test case for the upcoming default branch nameJohannes Schindelin via GitGitGadget, Oct 23, 2020
  33. 9/9 t1400: prepare for `main` being default branch nameJohannes Schindelin via GitGitGadget, Oct 23, 2020
  34. 8/9 tests: prepare aligned mentions of the default branch nameJohannes Schindelin via GitGitGadget, Oct 23, 2020
  35. Junio C HamanoOct 23, 2020

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.