Skip to content

clone: record submodule alternates when not recursing

Stefan Beller git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2submodule.c: add has_submodules to check if we have any submodulesbuiltin/checkout.c builtin/fetch.c builtin/read-tree.c +4 more+76 -243 replies
2/2clone: remember references for submodules even when not recursingbuiltin/clone.c+6 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] clone: record submodule alternates when not recursing

The meat is in the second patch:
The commit 31224cbdc7 (clone: recursive and reference option triggers submodule alternates, 2016-08-17) argued for any further submodule update to respect the initial setup. This is not the case if you only pass '--reference[-if-able]' to the initial clone without instructing to recurse into submodules.

If there are submodules however the user is likely to later run a 'submodule update --init' to obtain the submodules. In this case we also want to have the references available.

The first patch produces a nice helper function and some refactoring.

Thanks,
Stefan

Stefan Beller (2):
submodule.c: add has_submodules to check if we have any submodules
clone: remember references for submodules even when not recursing

 builtin/checkout.c          |  2 +-
 builtin/clone.c             |  8 +++--
 builtin/fetch.c             |  2 +-
 builtin/read-tree.c         |  2 +-
 builtin/submodule--helper.c |  6 ++--
 submodule.c                 | 78 +++++++++++++++++++++++++++++++++++----------
 submodule.h                 |  8 ++++-
 unpack-trees.c              |  2 +-
 8 files changed, 82 insertions(+), 26 deletions(-)
Signature · 1 line
2.12.2.575.gb14f27f917