diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-07-06 22:09:18 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-07-06 22:09:18 -0700 |
| commit | efafdca42162843e90cefdeefd8e6c244cee91f5 (patch) | |
| tree | 7cdfdc1a5604687c08b0a606af013d616877b028 /t/t4255-am-submodule.sh | |
| parent | 0a23331aa6bac1447d7983111d9c3efbea970cb3 (diff) | |
| parent | 5b0ac09fb17656553d85c7e3fbe0583ba3023e5e (diff) | |
| download | git-efafdca42162843e90cefdeefd8e6c244cee91f5.tar.gz | |
Merge branch 'dl/test-must-fail-fixes-5'
The effort to avoid using test_must_fail on non-git command continues.
* dl/test-must-fail-fixes-5:
lib-submodule-update: pass 'test_must_fail' as an argument
lib-submodule-update: prepend "git" to $command
lib-submodule-update: consolidate --recurse-submodules
lib-submodule-update: add space after function name
Diffstat (limited to 't/t4255-am-submodule.sh')
| -rwxr-xr-x | t/t4255-am-submodule.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/t/t4255-am-submodule.sh b/t/t4255-am-submodule.sh index 0ba8194403..a7ba08f728 100755 --- a/t/t4255-am-submodule.sh +++ b/t/t4255-am-submodule.sh @@ -6,17 +6,21 @@ test_description='git am handling submodules' . "$TEST_DIRECTORY"/lib-submodule-update.sh am () { - git format-patch --stdout --ignore-submodules=dirty "..$1" | git am - + git format-patch --stdout --ignore-submodules=dirty "..$1" >patch && + may_only_be_test_must_fail "$2" && + $2 git am patch } -test_submodule_switch "am" +test_submodule_switch_func "am" am_3way () { - git format-patch --stdout --ignore-submodules=dirty "..$1" | git am --3way - + git format-patch --stdout --ignore-submodules=dirty "..$1" >patch && + may_only_be_test_must_fail "$2" && + $2 git am --3way patch } KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1 -test_submodule_switch "am_3way" +test_submodule_switch_func "am_3way" test_expect_success 'setup diff.submodule' ' test_commit one && |
