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

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

From
Jeff King <peff@peff.net>
Date
Jun 6, 2017, 18:39 UTC
Message-ID
<20170606183914.6iowfhimo5yrvmtf@sigill.intra.peff.net>
In-Reply-To
<20170606181024.GA189073@google.com>
On Tue, Jun 06, 2017 at 11:10:24AM -0700, Brandon Williams wrote:
Show 25 quoted lines
> > > 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).
> > 
> > It's a feature, not a bug, IMO.
> > 
> > When starting out the journey to improve submodules, one of the major
> > principle was to not interfere with gitlinks too much, as they are used in
> > ways git cannot fathom (cf git-series storing patches in gitlink form).
> > 
> > And building on that: You asked for recursing into *submodules*, not
> > into *gitlinks*. And submodules in the new Git have stronger requirements
> > w.r.t. the gitmodules file. (You have to tell us exactly how you want your
> > submodule to be treated, and we do not want to half-ass guess around
> > the shortcomings of a user not telling us about the submodule)
> 
> Just for some background on the new behavior and how this functionality
> changed: My series changed how 'submodule init' behaved if you have
> 'submodule.active' set.  Once set (like how clone --recurse does now)
> when not provided any path to a submodule, a list of 'active' submodules
> matching the 'submodule.active' pathspec will be initialized.  One of
> the requirements to be 'active' is to have an entry in the .gitmodules
> file so gitlinks without an entry in the .gitmodules file will simply be
> ignored now.

OK, thanks for the explanation. I certainly agree that treating .gitmodules as the source of truth is consistent and easy to explain. I'll update my test to handle the new behavior (it's a regression test for how GitHub Pages handles some broken setups).

-Peff
Previous: Brandon WilliamsNext: Jeff King
Message 4 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.