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

[PATCH] Re: Bug with "git submodule update" + subrepo with differing path/name?

From
Stefan Beller <sbeller@google.com>
Date
Dec 19, 2017, 18:02 UTC
Message-ID
<20171219180230.254881-1-sbeller@google.com>
In-Reply-To
<CAFBGMVPBwxeSXCTcoBdxDbYtJo-38w=tf4T6-rNWuys=3drP+A@mail.gmail.com>

I tried reproducing the issue (based on the `next` branch, not 2.15, but I do not recall any changes in the submodule area lately), and could not come up with a reproduction recipe, but here is what I got so far, maybe you can take it from here (i.e. either make the test case more like your environment such that it fails, or rather bisect git to tell us the offending commit) ?

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 t/t7406-submodule-update.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 6f083c4d68..d957305c38 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -978,4 +978,20 @@ test_expect_success 'git clone passes the parallel jobs config on to submodules'
 	rm -rf super4
 '
 
+test_expect_success 'git submodule update works with submodules with name/path difference' '
+	test_create_repo super6 &&
+	(
+		cd super6 &&
+		git submodule add ../submodule sub1 &&
+		git submodule add --name testingname ../submodule sub2 &&
+		git commit -m initial &&
+		git -C sub1 checkout HEAD^ &&
+		git -C sub2 checkout HEAD^ &&
+
+		git submodule update >actual &&
+		grep sub1 actual &&
+		grep sub2 actual
+	)
+'
+
 test_done
-- 
2.15.1.620.gb9897f4670-goog
Previous: Andreas UrkeNext: Junio C Hamano
Message 2 of 11 in “Bug with "git submodule update" + subrepo with differing path/name?”
  1. Andreas UrkeDec 18, 2017
  2. Re: Bug with "git submodule update" + subrepo with differing path/name?Stefan Beller, Dec 19, 2017
  3. Junio C HamanoDec 19, 2017
  4. Stefan BellerDec 19, 2017
  5. Andreas UrkeDec 20, 2017
  6. Stefan BellerDec 20, 2017
  7. Andreas UrkeDec 21, 2017
  8. Stefan BellerDec 21, 2017
  9. Andreas UrkeDec 21, 2017
  10. Stefan BellerDec 21, 2017
  11. Stefan BellerDec 21, 2017

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.