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

Re: [RFC/PATCH] clone: add `--shallow-submodules` flag

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 14, 2016, 18:37 UTC
Message-ID
<xmqqh9g8aosl.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kb731RzLco_thuucTokLCe4xNMbEod9C=gWG+P+ruih7g@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 11 quoted lines
> you'd fetch as usual without moving the anchor point. You could have
> options like
>
>     $ git fetch --recurse-submodules[=label/pattern]
> --unshallow-submodules[=label/pattern]
> ...
> So the first one should be shallowed after fetch, but the second would
> fetch or even deepen automatically?
>
> I am not sure if we add too much "intuitive magic" here as it would be
> hard to explain why that happens?

All of these are things that need to be thought about when you are making more things recurse into submodules, as you would want to make sure people can do different things to each of the submodule they have.

And if my comment to an RFC/PATCH made you think about them, it served its purpose. I didn't mean to say "You must implement the smart from the beginning"--I just meant to say that users will expect more from the recursive behaviour and you must be prepared for it.

Previous: Stefan Beller
Message 6 of 6 in “clone: add `--shallow-submodules` flag”
  1. clone: add `--shallow-submodules` flagStefan Beller, Mar 11, 2016
  2. Junio C HamanoMar 12, 2016
  3. Stefan BellerMar 12, 2016
  4. Junio C HamanoMar 12, 2016
  5. Stefan BellerMar 14, 2016
  6. Junio C HamanoMar 14, 2016

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.