Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2020-04-29 15:22:24 +0300
committerJunio C Hamano <gitster@pobox.com>2020-04-29 20:36:55 +0300
commitadd245234820be6cec3f54174d44f738aa1a80f9 (patch)
tree806f68ff6896d4d24be81fba79c8763e1004cc56 /t/lib-submodule-update.sh
parent27691ca27e0be0195e30450cc0316c2cc090dfca (diff)
lib-submodule-update: consolidate --recurse-submodules
Both test_submodule_switch_recursing_with_args() and test_submodule_forced_switch_recursing_with_args() call the internal function test_submodule_recursing_with_args_common() with the final argument of `--recurse-submodules`. Consolidate this duplication by appending the argument in test_submodule_recursing_with_args_common(). Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-submodule-update.sh')
-rwxr-xr-xt/lib-submodule-update.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 122554acd6..bb36287803 100755
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -630,7 +630,7 @@ test_submodule_forced_switch () {
# Internal function; use test_submodule_switch_recursing_with_args() or
# test_submodule_forced_switch_recursing_with_args() instead.
test_submodule_recursing_with_args_common () {
- command="$1"
+ command="$1 --recurse-submodules"
######################### Appearing submodule #########################
# Switching to a commit letting a submodule appear checks it out ...
@@ -809,7 +809,7 @@ test_submodule_recursing_with_args_common () {
# test_submodule_switch_recursing_with_args "$GIT_COMMAND"
test_submodule_switch_recursing_with_args () {
cmd_args="$1"
- command="git $cmd_args --recurse-submodules"
+ command="git $cmd_args"
test_submodule_recursing_with_args_common "$command"
RESULTDS=success
@@ -927,7 +927,7 @@ test_submodule_switch_recursing_with_args () {
# away local changes in the superproject is allowed.
test_submodule_forced_switch_recursing_with_args () {
cmd_args="$1"
- command="git $cmd_args --recurse-submodules"
+ command="git $cmd_args"
test_submodule_recursing_with_args_common "$command"
RESULT=success