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

[bug] git clone: -c key=value missed when cloning submodules with --recurse-submodules

From
ryenus <ryenus@gmail.com>
Date
Aug 11, 2025, 14:47 UTC
Message-ID
<CAKkAvayK9WRBLtPL7XCsBP=UGbYMnDYE6+EPRpCxJioryNeBBA@mail.gmail.com>
Given 2 repositories, the 1st is "parent", with the 2nd as a submodule:
* https://remote.host/parent
* https://remote.host/submodule
When cloning the parent repo with the below command:
    git clone -c key=value --recurse-submodules https://remote.host/parent

While "-c key=value" is properly applied when cloning the parent, it's missed when cloning the submodule.

Here the actual key/value is something like "url.new.insteadOf=old" for authentication purpose.

Fortunately the following works:
    git -c key=value clone --recurse-submodules https://remote.host/parent
Ideally the first form should also work.
Next: D. Ben Knoble
Message 1 of 2 in “[bug] git clone: -c key=value missed when cloning submodules with --recurse-submodules”
  1. ryenusAug 11, 2025
  2. D. Ben KnobleAug 11, 2025

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.