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

[PATCH 0/3] clone --shallow-submodules flag

From
Stefan Beller <sbeller@google.com>
Date
Apr 12, 2016, 23:48 UTC
Message-ID
<1460504929-19208-1-git-send-email-sbeller@google.com>

(This is a resend of a series from March 15th, titled "Towards sane shallow clones with submodules", this series applies on top of sb/submodule-parallel-update, it replaces sb/clone-shallow-passthru)

When creating a shallow clone of a repository with submodules, the depth argument does not influence the submodules, i.e. the submodules are done as non-shallow clones. It is unclear what the best default is for the depth of submodules of a shallow clone, so we need to have the possibility to do all kinds of combinations:

* shallow super project with shallow submodules
  e.g. build bots starting always from scratch. They want to transmit
  the least amount of network data as well as using the least amount
  of space on their hard drive.
* shallow super project with unshallow submodules
  e.g. The superproject is just there to track a collection of repositories
  and it is not important to have the relationship between the repositories
  intact. However the history of the individual submodules matter.
* unshallow super project with shallow submodules
  e.g. The superproject is the actual project and the submodule is a
  library which is rarely touched.

The new switch to select submodules to be shallow or unshallow supports all of these three cases.

Changes to the previous series:
 * Reordered patch 1 and 2, as it sounds like a more natural ordering.
 
Any comments welcome!
Thanks,
Stefan
Stefan Beller (3):
  clone: add `--shallow-submodules` flag
  submodule clone: pass along `local` option
  clone: Add t5614 to test cloning submodules with shallowness involved
 Documentation/git-clone.txt | 13 +++++--
 builtin/clone.c             | 21 ++++++++++++
 builtin/submodule--helper.c | 22 ++++++++++--
 git-submodule.sh            |  7 ++++
 t/t5614-clone-submodules.sh | 82 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 139 insertions(+), 6 deletions(-)
 create mode 100755 t/t5614-clone-submodules.sh
-- 
2.5.0.264.gc776916.dirty
Next: Stefan Beller
Message 1 of 9 in “clone --shallow-submodules flag”
  1. 0/3 clone --shallow-submodules flagStefan Beller, Apr 12, 2016
  2. 1/3 submodule clone: pass along `local` optionStefan Beller, Apr 12, 2016
  3. Lars SchneiderApr 25, 2016
  4. Stefan BellerApr 25, 2016
  5. 2/3 clone: add `--shallow-submodules` flagStefan Beller, Apr 12, 2016
  6. 3/3 clone: add t5614 to test cloning submodules with shallowness involvedStefan Beller, Apr 12, 2016
  7. Jacob KellerApr 13, 2016
  8. Stefan BellerApr 25, 2016
  9. Lars SchneiderApr 25, 2016

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.