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

[PATCH 1/4] submodule update: add regression test with old style setups

From
Stefan Beller <sbeller@google.com>
Date
Dec 14, 2018, 23:59 UTC
Message-ID
<20181214235945.41191-2-sbeller@google.com>
In-Reply-To
<20181214235945.41191-1-sbeller@google.com>

As f178c13fda (Revert "Merge branch 'sb/submodule-core-worktree'", 2018-09-07) was produced shortly before a release, nobody asked for a regression test to be included. Add a regression test that makes sure that the invocation of `git submodule update` on old setups doesn't produce errors as pointed out in f178c13fda.

The place to add such a regression test may look odd in t7412, but that is the best place as there we setup old style submodule setups explicitly.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 t/t7412-submodule-absorbgitdirs.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/t/t7412-submodule-absorbgitdirs.sh b/t/t7412-submodule-absorbgitdirs.sh
index ce74c12da2..1cfa150768 100755
--- a/t/t7412-submodule-absorbgitdirs.sh
+++ b/t/t7412-submodule-absorbgitdirs.sh
@@ -75,7 +75,12 @@ test_expect_success 're-setup nested submodule' '
 	GIT_WORK_TREE=../../../nested git -C sub1/.git/modules/nested config \
 		core.worktree "../../../nested" &&
 	# make sure this re-setup is correct
-	git status --ignore-submodules=none
+	git status --ignore-submodules=none &&
+
+	# also make sure this old setup does not regress
+	git submodule update --init --recursive >out 2>err &&
+	test_must_be_empty out &&
+	test_must_be_empty err
 '
 
 test_expect_success 'absorb the git dir in a nested submodule' '
-- 
2.20.0.405.gbc1bbc6f85-goog
Previous: Stefan BellerNext: Junio C Hamano
Message 16 of 21 in “[PATCH 0/4]”
  1. 0/4 Stefan Beller, Dec 7, 2018
  2. 1/4 submodule update: add regression test with old style setupsStefan Beller, Dec 7, 2018
  3. Junio C HamanoDec 9, 2018
  4. 2/4 submodule: unset core.worktree if no working tree is presentStefan Beller, Dec 7, 2018
  5. Junio C HamanoDec 8, 2018
  6. 3/4 submodule--helper: fix BUG message in ensure_core_worktreeStefan Beller, Dec 7, 2018
  7. Junio C HamanoDec 8, 2018
  8. Stefan BellerDec 12, 2018
  9. Junio C HamanoDec 13, 2018
  10. 4/4 submodule deinit: unset core.worktreeStefan Beller, Dec 7, 2018
  11. Junio C HamanoDec 8, 2018
  12. Junio C HamanoDec 8, 2018
  13. Stefan BellerDec 12, 2018
  14. Junio C HamanoDec 13, 2018
  15. 0/4 submodules: unset core.worktree when no working tree presentStefan Beller, Dec 14, 2018
  16. 1/4 submodule update: add regression test with old style setupsStefan Beller, Dec 14, 2018
  17. Junio C HamanoDec 26, 2018
  18. 2/4 submodule: unset core.worktree if no working tree is presentStefan Beller, Dec 14, 2018
  19. Junio C HamanoDec 26, 2018
  20. 4/4 submodule deinit: unset core.worktreeStefan Beller, Dec 14, 2018
  21. 3/4 submodule--helper: fix BUG message in ensure_core_worktreeStefan Beller, Dec 14, 2018

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.