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

Wanted: shallow submodule clones with --no-single-branch.

From
TATor Andersson <tor@ccxvii.net>
Date
Dec 30, 2016, 10:50 UTC
Message-ID
<CAAmwXB=M8yZY2sFLwavrrQSEW9bipFhNZyLduwYXtZNK6-Ppxg@mail.gmail.com>
Hi,

When adding submodules with --depth=1 only the master branch is cloned. This often leaves the submodule pointing to a non-existing commit.

It would be useful if I could pass the --no-single-branch argument to the submodule clone process, since then a submodule can point to any tag or branch without ending up in this situation. I've got a local patch to hardwire the --no-single-branch argument in the builtin/submodule--helper.c clone_submodule function, but I'm not sure if this will have any other adverse effects?

Better yet would be for the shallow submodule clone to automatically retrieve and graft the actual commit the submodule points to, but that's probably wishing for too much.

-Tor
Next: Stefan Beller
Message 1 of 2 in “Wanted: shallow submodule clones with --no-single-branch.”
  1. Tor AnderssonDec 30, 2016
  2. Stefan BellerJan 3, 2017

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.