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

Fetch on submodule update

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Aug 1, 2018, 17:18 UTC
Message-ID
<CAHd499B2VingKU-+7idv9FROYgCmOAzZ7YAQgWdwY1YUeTUVHA@mail.gmail.com>
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?
Next: Jonathan Nieder
Message 1 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.