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

[PATCH v3 1/2] Testcase for submodule status on empty dirs

From
PKPeter Kaestle <peter.kaestle@nokia.com>
Date
Jan 24, 2020, 10:34 UTC
Message-ID
<1579862044-29847-1-git-send-email-peter.kaestle@nokia.com>
In-Reply-To
<xmqq4kwl512y.fsf@gitster-ct.c.googlers.com>

Test that submodule status reports initialized but not cloned submodules as missing.

Signed-off-by: Peter Kaestle <peter.kaestle@nokia.com>
---
 t/t7400-submodule-basic.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 7f75bb1..2e84914 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -399,6 +399,14 @@ test_expect_success 'init should register submodule url in .git/config' '
 	test_cmp expect url
 '
 
+test_expect_success 'status should still be "missing" after initializing' '
+	rm -fr init &&
+	mkdir init &&
+	git submodule status >lines &&
+	rm -fr init &&
+	grep "^-$rev1" lines
+'
+
 test_failure_with_unknown_submodule () {
 	test_must_fail git submodule $1 no-such-submodule 2>output.err &&
 	test_i18ngrep "^error: .*no-such-submodule" output.err
-- 
2.6.2
Previous: Junio C HamanoNext: Peter Kaestle
Message 4 of 16 in “Fix submodule status of dirs initialized but empty”
  1. Fix submodule status of dirs initialized but emptyPeter Kästle, Jan 14, 2020
  2. Fix status of initialized but not cloned submodulesPeter Kaestle, Jan 21, 2020
  3. Junio C HamanoJan 23, 2020
  4. 1/2 Testcase for submodule status on empty dirsPeter Kaestle, Jan 24, 2020
  5. 2/2 Fix status of initialized but not cloned submodulesPeter Kaestle, Jan 24, 2020
  6. Junio C HamanoJan 24, 2020
  7. 1/2 t7400: add a testcase for submodule status on empty dirsPeter Kaestle, Jan 27, 2020
  8. 2/2 Fix status of initialized but not cloned submodulesPeter Kaestle, Jan 27, 2020
  9. Junio C HamanoJan 27, 2020
  10. Peter KästleJan 28, 2020
  11. t7400: testcase for submodule status on unregistered inner git reposPeter Kaestle, Feb 2, 2020
  12. Peter KästleJan 24, 2020
  13. Junio C HamanoJan 24, 2020
  14. Peter KästleJan 27, 2020
  15. Junio C HamanoJan 27, 2020
  16. Peter KästleFeb 2, 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.