mbox series

[v3,0/4] clone: update submodule.recurse in config when using --recurse-submodule

Message ID pull.1006.v3.git.1627946590.gitgitgadget@gmail.com (mailing list archive)
Headers show
Series clone: update submodule.recurse in config when using --recurse-submodule | expand

Message

Phillip Wood via GitGitGadget Aug. 2, 2021, 11:23 p.m. UTC
When running 'git clone --recurse-submodules', developers expect various
other commands such as 'pull' and 'checkout' to also run recursively into
submodules.The submitted code updates the 'submodule.recurse' config value
to true when 'git clone' is run with the '--recurse-submodules' option.

Signed-off-by: Mahi Kolla mahikolla@google.com

Mahi Kolla (4):
  clone: update submodule.recurse in config when using
    --recurse-submodule
  clone: update submodule.recurse in config when using
    --recurse-submodule
  clone test: update whitespace according to style guide
  clone: update whitespace according to style guide

 builtin/clone.c          | 1 +
 t/t5606-clone-options.sh | 7 +++++++
 2 files changed, 8 insertions(+)


base-commit: 940fe202adcbf9fa1825c648d97cbe1b90d26aec
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1006%2F24mahik%2Fmaster-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1006/24mahik/master-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/1006

Range-diff vs v2:

 1:  fea3d6d72b6 = 1:  fea3d6d72b6 clone: update submodule.recurse in config when using --recurse-submodule
 2:  dd13a65ef0f = 2:  dd13a65ef0f clone: update submodule.recurse in config when using --recurse-submodule
 3:  020eaa2c819 = 3:  020eaa2c819 clone test: update whitespace according to style guide
 -:  ----------- > 4:  f3ddb344b49 clone: update whitespace according to style guide

Comments

Philippe Blain Aug. 3, 2021, 3:08 a.m. UTC | #1
Hi Mahi,

Le 2021-08-02 à 19:23, Mahi Kolla via GitGitGadget a écrit :
> When running 'git clone --recurse-submodules', developers expect various
> other commands such as 'pull' and 'checkout' to also run recursively into
> submodules.The submitted code updates the 'submodule.recurse' config value
> to true when 'git clone' is run with the '--recurse-submodules' option.
> 
> Signed-off-by: Mahi Kolla mahikolla@google.com
> 
> Mahi Kolla (4):
>    clone: update submodule.recurse in config when using
>      --recurse-submodule
>    clone: update submodule.recurse in config when using
>      --recurse-submodule
>    clone test: update whitespace according to style guide
>    clone: update whitespace according to style guide


This could all be done in a single patch. As long as the patches are not merged
to the 'next' branch, you can simply force-push and re '/submit' on Gitgitgadget.

> 
>   builtin/clone.c          | 1 +
>   t/t5606-clone-options.sh | 7 +++++++
>   2 files changed, 8 insertions(+)

I think this change would require a mention in the 'git-clone(1)' man page.

I'm very much in favor of a change like this. It is a pretty big change in
behaviour, but I really believe this is a good way forward. Thanks for getting
the ball rolling on this!
Junio C Hamano Aug. 3, 2021, 10:41 p.m. UTC | #2
"Mahi Kolla via GitGitGadget" <gitgitgadget@gmail.com> writes:

> When running 'git clone --recurse-submodules', developers expect various
> other commands such as 'pull' and 'checkout' to also run recursively into
> submodules.

Some developers might, but "developers expect" as if we speak for
everybody is a bold statement to make that needs to be
substantiated, I would think.  Is this something easy to make
opt-in, e.g. "git clone --recurse-submodules=sticky" or something?