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

[PATCH 0/2] clone: shallow-submodules should be single-branch by default

From
BGBruce Perry via GitGitGadget <gitgitgadget@gmail.com>
Date
Jul 2, 2024, 19:07 UTC
Message-ID
<pull.1740.git.git.1719947271.gitgitgadget@gmail.com>

I noticed a couple places where the behavior of recursive clones for shallow submodules does not match what is implied by the documentation. Shallow submodules should be, but aren't, single branch by default. It would also be useful to allow users to override the shallow specification in gitmodules on the command line for clones as they can for submodule update. The modification here for the former is a bit ugly, but hopefully at least gets the point across to start a discussion. First time submitting a patch here, hopefully I'm getting the process right.

Bruce Perry (2):
  clone: shallow-submodules should be single-branch by default
  clone: no-shallow-submodules clone overrides option in gitmodules
 Documentation/git-clone.txt         |  3 ++
 Documentation/gitmodules.txt        |  4 +--
 builtin/clone.c                     | 10 ++++--
 t/t5614-clone-submodules-shallow.sh | 52 +++++++++++++++++++++++------
 4 files changed, 53 insertions(+), 16 deletions(-)
base-commit: daed0c68e94967bfbb3f87e15f7c9090dc1aa1e1
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1740%2Fbaperry2%2Fsubmods-clone-bug-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1740/baperry2/submods-clone-bug-v1
Pull-Request: https://github.com/git/git/pull/1740
-- 
gitgitgadget
Next: Bruce Perry via GitGitGadget
Message 1 of 7 in “clone: shallow-submodules should be single-branch by default”
  1. 0/2 clone: shallow-submodules should be single-branch by defaultBruce Perry via GitGitGadget, Jul 2, 2024
  2. 1/2 clone: shallow-submodules should be single-branch by defaultBruce Perry via GitGitGadget, Jul 2, 2024
  3. 2/2 clone: no-shallow-submodules clone overrides option in gitmodulesBruce Perry via GitGitGadget, Jul 2, 2024
  4. rsbecker@nexbridge.comJul 2, 2024
  5. Bruce PerryJul 3, 2024
  6. rsbecker@nexbridge.comJul 3, 2024
  7. Bruce PerryJul 25, 2024

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.