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-06-11 20:41:49 +0300
committerJunio C Hamano <gitster@pobox.com>2020-06-12 21:33:40 +0300
commitaa06180ac90984204e59ac74bb4e3a4d09037ac2 (patch)
treed2754694324423c5904f60990d702826b3721ff0 /t/t5572-pull-submodule.sh
parentadd245234820be6cec3f54174d44f738aa1a80f9 (diff)
lib-submodule-update: prepend "git" to $command
Since all invocations of test_submodule_forced_switch() are git commands, automatically prepend "git" before invoking test_submodule_switch_common(). Similarly, many invocations of test_submodule_switch() are also git commands so automatically prepend "git" before invoking test_submodule_switch_common() as well. Finally, for invocations of test_submodule_switch() that invoke a custom function, rename the old function to test_submodule_switch_func(). This is necessary because in a future commit, we will be adding some logic that needs to distinguish between an invocation of a plain git comamnd and an invocation of a test helper function. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5572-pull-submodule.sh')
-rwxr-xr-xt/t5572-pull-submodule.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh
index f916729a12..f911bf631e 100755
--- a/t/t5572-pull-submodule.sh
+++ b/t/t5572-pull-submodule.sh
@@ -17,21 +17,21 @@ git_pull () {
}
# pulls without conflicts
-test_submodule_switch "git_pull"
+test_submodule_switch_func "git_pull"
git_pull_ff () {
reset_branch_to_HEAD "$1" &&
git pull --ff
}
-test_submodule_switch "git_pull_ff"
+test_submodule_switch_func "git_pull_ff"
git_pull_ff_only () {
reset_branch_to_HEAD "$1" &&
git pull --ff-only
}
-test_submodule_switch "git_pull_ff_only"
+test_submodule_switch_func "git_pull_ff_only"
git_pull_noff () {
reset_branch_to_HEAD "$1" &&
@@ -40,7 +40,7 @@ git_pull_noff () {
KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
-test_submodule_switch "git_pull_noff"
+test_submodule_switch_func "git_pull_noff"
test_expect_success 'pull --recurse-submodule setup' '
test_create_repo child &&