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

[PATCH 1/3] t6437: run absorbgitdirs on repos

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Sep 8, 2021, 18:18 UTC
Message-ID
<942d3ce2d3cf96192c7e9d5860a18c333dd08acf.1631123754.git.jonathantanmy@google.com>
In-Reply-To
<cover.1631123754.git.jonathantanmy@google.com>

The submodule merge code is being transitioned away from add_submodule_odb() to repo_submodule_init(), and the latter does not support submodules that have their .git directories in the worktree (instead of in .git/modules). Migrate the test code by calling absorbgitdirs wherever necessary to place the .git directories of submodules in .git/modules of the superproject.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
---
 t/t6437-submodule-merge.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh
index e5e89c2045..8efce86b42 100755
--- a/t/t6437-submodule-merge.sh
+++ b/t/t6437-submodule-merge.sh
@@ -27,7 +27,8 @@ test_expect_success setup '
 	 git add file &&
 	 test_tick &&
 	 git commit -m sub-root) &&
-	git add sub &&
+	git submodule add ./sub sub &&
+	git submodule absorbgitdirs &&
 	test_tick &&
 	git commit -m root &&
 
@@ -82,7 +83,8 @@ test_expect_success 'setup for merge search' '
 	 git branch sub-a) &&
 	git commit --allow-empty -m init &&
 	git branch init &&
-	git add sub &&
+	git submodule add ./sub sub &&
+	git submodule absorbgitdirs &&
 	git commit -m "a" &&
 	git branch a &&
 
@@ -112,7 +114,8 @@ test_expect_success 'setup for merge search' '
 	git checkout -b g init &&
 	(cd sub &&
 	 git checkout -b sub-g sub-c) &&
-	git add sub &&
+	git submodule add ./sub sub &&
+	git submodule absorbgitdirs &&
 	git commit -a -m "g")
 '
 
-- 
2.33.0.309.g3052b89438-goog
Previous: Jonathan TanNext: Jonathan Tan
Message 2 of 14 in “More add_submodule_odb() cleanup in merge code”
  1. 0/3 More add_submodule_odb() cleanup in merge codeJonathan Tan, Sep 8, 2021
  2. 1/3 t6437: run absorbgitdirs on reposJonathan Tan, Sep 8, 2021
  3. Jonathan TanSep 8, 2021
  4. Junio C HamanoSep 8, 2021
  5. Jonathan TanSep 9, 2021
  6. 2/3 revision: remove "submodule" from opt structJonathan Tan, Sep 8, 2021
  7. 3/3 DO NOT SUBMIT commit-reach,revision: verify non-mixingJonathan Tan, Sep 8, 2021
  8. Elijah NewrenSep 9, 2021
  9. Jonathan TanSep 9, 2021
  10. 0/3 More add_submodule_odb() cleanup in merge codeJonathan Tan, Sep 9, 2021
  11. 1/3 submodule: remove unnecessary unabsorbed fallbackJonathan Tan, Sep 9, 2021
  12. 2/3 repository: support unabsorbed in repo_submodule_initJonathan Tan, Sep 9, 2021
  13. 3/3 revision: remove "submodule" from opt structJonathan Tan, Sep 9, 2021
  14. Elijah NewrenSep 14, 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.