about summary refs log tree commit diff
path: root/third_party/git/t/t4255-am-submodule.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/t4255-am-submodule.sh')
-rwxr-xr-xthird_party/git/t/t4255-am-submodule.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/third_party/git/t/t4255-am-submodule.sh b/third_party/git/t/t4255-am-submodule.sh
index 0ba8194403f6..a7ba08f728c0 100755
--- a/third_party/git/t/t4255-am-submodule.sh
+++ b/third_party/git/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 &&