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

Re: Fetch on submodule update

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 1, 2018, 22:34 UTC
Message-ID
<20180801223439.GA189024@aiede.svl.corp.google.com>
In-Reply-To
<CAHd499B2VingKU-+7idv9FROYgCmOAzZ7YAQgWdwY1YUeTUVHA@mail.gmail.com>
Hi,
Robert Dailey wrote:
Show 20 quoted lines
> Problem: I want to avoid recursively fetching submodules when I run a
> `fetch` command, and instead defer that operation to the next
> `submodule update`. Essentially I want `fetch.recurseSubmodules` to be
> `false`, and `get submodule update` to do exactly what it does with
> the `--remote` option, but still use the SHA1 of the submodule instead
> of updating to the tip of the specified branch in the git modules
> config.
>
> I hope that makes sense. The reason for this ask is to
> improve/streamline workflow in parent repositories. There are cases
> where I want to quickly fetch only the parent repository, even if a
> submodule changes, to perform some changes that do not require the
> submodule itself (yet). Then at a later time, do `submodule update`
> and have it automatically fetch when the SHA1 it's updating to does
> not exist (because the former fetch operation for the submodule was
> skipped). For my case, it's very slow to wait on submodules to
> recursively fetch when I only wanted to fetch the parent repo for the
> specific task I plan to do.
>
> Is this possible right now through some variation of configuration?

Can you say more about the overall workflow? This seems quite different from what we've been designing --recurse-submodules around:

- avoiding the end user ever having to use the "git submodule" command,
  except to add, remove, or reconfigure submodules
- treating the whole codebase as something like one project, so that
  "git checkout --recurse-submodules <commit>" always checks out the
  same state

More details about the application would help with better understanding whether it can fit into this framework, or whether it's a case where you'd want to set "submodule.recurse" to false to have more manual control.

Thanks and hope that helps, Jonathan

Previous: Robert DaileyNext: Jonathan Nieder
Message 2 of 6 in “Fetch on submodule update”
  1. Robert DaileyAug 1, 2018
  2. Jonathan NiederAug 1, 2018
  3. Jonathan NiederAug 2, 2018
  4. Robert DaileyAug 6, 2018
  5. Jonathan NiederAug 6, 2018
  6. Robert DaileyAug 6, 2018

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.