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

sudmodule.<name>.recurse ignored

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
Oct 7, 2022, 10:10 UTC
Message-ID
<20221007060713-mutt-send-email-mst@kernel.org>
THE CONFIGURATION OF SUBMODULES
       Submodule operations can be configured using the following mechanisms (from highest to lowest precedence):
       •   The command line for those commands that support taking submodules as part of their pathspecs. Most commands have a boolean
           flag --recurse-submodules which specify whether to recurse into submodules. Examples are grep and checkout. Some commands
           take enums, such as fetch and push, where you can specify how submodules are affected.
       •   The configuration inside the submodule. This includes $GIT_DIR/config in the submodule, but also settings in the tree such
           as a .gitattributes or .gitignore files that specify behavior of commands inside the submodule.
           For example an effect from the submodule’s .gitignore file would be observed when you run git status
           --ignore-submodules=none in the superproject. This collects information from the submodule’s working directory by running
           status in the submodule while paying attention to the .gitignore file of the submodule.
           The submodule’s $GIT_DIR/config file would come into play when running git push --recurse-submodules=check in the
           superproject, as this would check if the submodule has any changes not published to any remote. The remotes are configured
           in the submodule as usual in the $GIT_DIR/config file.
       •   The configuration file $GIT_DIR/config in the superproject. Git only recurses into active submodules (see "ACTIVE
           SUBMODULES" section below).
           If the submodule is not yet initialized, then the configuration inside the submodule does not exist yet, so where to obtain
           the submodule from is configured here for example.
       •   The .gitmodules file inside the superproject. A project usually uses this file to suggest defaults for the upstream
           collection of repositories for the mapping that is required between a submodule’s name and its path.
           This file mainly serves as the mapping between the name and path of submodules in the superproject, such that the
           submodule’s Git directory can be located.
           If the submodule has never been initialized, this is the only place where submodule configuration is found. It serves as
           the last fallback to specify where to obtain the submodule from.

However, when we are talking about the recurse attribute, it is not taken from .gitmodules - only command line and .git/config seem to be consulted. Is this a bug or a feature?

Thanks!
-- 
MST
Next: Ævar Arnfjörð Bjarmason
Message 1 of 8 in “sudmodule.<name>.recurse ignored”
  1. Michael S. TsirkinOct 7, 2022
  2. Ævar Arnfjörð BjarmasonOct 7, 2022
  3. Michael S. TsirkinOct 7, 2022
  4. Glen ChooOct 7, 2022
  5. Junio C HamanoOct 7, 2022
  6. Michael S. TsirkinOct 11, 2022
  7. Glen ChooOct 12, 2022
  8. Michael S. TsirkinOct 12, 2022

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.