diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-05 10:43:03 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-05 10:43:03 -0800 |
commit | b22db265d6bde72391c8d47700dc781a3ea2ae41 (patch) | |
tree | e7cd2c479dac47579b08096130d1a8c63e04e19b /builtin/clone.c | |
parent | Merge branch 'jk/nth-packed-object-id' (diff) | |
parent | clone: pass --single-branch during --recurse-submodules (diff) | |
download | tgif-b22db265d6bde72391c8d47700dc781a3ea2ae41.tar.xz |
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 4f6150c55c..1ad26f4d8c 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); } |