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

[BUG?] gitlink without .gitmodules no longer fails recursive clone

From
Jeff King <peff@peff.net>
Date
Jun 6, 2017, 03:56 UTC
Message-ID
<20170606035650.oykbz2uc4xkr3cr2@sigill.intra.peff.net>

While running some regression tests with v2.13, I noticed an odd behavior. If I create a repository where there's a gitlink with no matching .gitmodules entry:

  git init repo
  cd repo
  n10=1234abcdef
  n40=$n10$n10$n10$n10
  git update-index --add --cacheinfo 160000 $n40 foo
  git commit -m "gitlink without .gitmodule entry"
and then I clone it recursively with v2.12, it fails:
  $ git.v2.12.3 clone --recurse-submodules . dst; echo exit=$?
  Cloning into 'dst'...
  done.
  fatal: No url found for submodule path 'foo' in .gitmodules
  exit=128
But with v2.13, it silently ignores the submodule:
  $ git.v2.13.1 clone --recurse-submodules . dst; echo exit=$?
  Cloning into 'dst'...
  done.
  exit=0

This bisects to your bb62e0a99 (clone: teach --recurse-submodules to optionally take a pathspec, 2017-03-17). That patch just sets submodule.active by default, so I think the real issue is probably in a086f921a (submodule: decouple url and submodule interest, 2017-03-17).

I also wasn't sure if this might be intentional. I.e., that we'd just consider gitlink entries which aren't even configured as not-submodules and ignore them. I couldn't certainly see an argument for moving in that direction, but it is different than what we used to do. But I couldn't find anything in any of the commit messages that mentioned this either way, so I figured I'd punt and ask. :)

-Peff
Next: Stefan Beller
Message 1 of 23 in “[BUG?] gitlink without .gitmodules no longer fails recursive clone”
  1. Jeff KingJun 6, 2017
  2. Stefan BellerJun 6, 2017
  3. Brandon WilliamsJun 6, 2017
  4. Jeff KingJun 6, 2017
  5. Jeff KingJun 9, 2017
  6. Junio C HamanoJun 10, 2017
  7. Jeff KingJun 10, 2017
  8. Junio C HamanoJun 10, 2017
  9. Stefan BellerJun 12, 2017
  10. Jeff KingJun 13, 2017
  11. 1/2 add: warn when adding an embedded repositoryJeff King, Jun 13, 2017
  12. Stefan BellerJun 13, 2017
  13. Brandon WilliamsJun 13, 2017
  14. Jeff KingJun 14, 2017
  15. 0/2 warn when adding an embedded repositoryJeff King, Jun 14, 2017
  16. 1/2 add: warn when adding an embedded repositoryJeff King, Jun 14, 2017
  17. 2/2 t: move "git add submodule" into test blocksJeff King, Jun 14, 2017
  18. Stefan BellerJun 14, 2017
  19. Jeff KingJun 15, 2017
  20. Junio C HamanoJun 13, 2017
  21. Jeff KingJun 14, 2017
  22. 2/2 t: move "git add submodule" into test blocksJeff King, Jun 13, 2017
  23. Stefan BellerJun 13, 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.