diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-05 21:43:03 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-05 21:43:03 +0300 |
commit | b22db265d6bde72391c8d47700dc781a3ea2ae41 (patch) | |
tree | e7cd2c479dac47579b08096130d1a8c63e04e19b /builtin/clone.c | |
parent | e8e71848ea866d7dc34eacffc20b9c3826ae29a1 (diff) | |
parent | 132f600b060c2db7fd3d450dfadb6779a61c648a (diff) |
Merge branch 'es/recursive-single-branch-clone'
"git clone --recurse-submodules --single-branch" now uses the same
single-branch option when cloning the submodules.
* es/recursive-single-branch-clone:
clone: pass --single-branch during --recurse-submodules
submodule--helper: use C99 named initializer
Diffstat (limited to 'builtin/clone.c')
-rw-r--r-- | builtin/clone.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index 4f6150c55c3..1ad26f4d8c8 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -833,6 +833,11 @@ static int checkout(int submodule_progress) argv_array_push(&args, "--no-fetch"); } + if (option_single_branch >= 0) + argv_array_push(&args, option_single_branch ? + "--single-branch" : + "--no-single-branch"); + err = run_command_v_opt(args.argv, RUN_GIT_CMD); argv_array_clear(&args); } |