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
This commit is contained in:
Junio C Hamano
2020-03-05 10:43:03 -08:00
5 changed files with 56 additions and 9 deletions

View File

@ -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);
}