about summary refs log tree commit diff
path: root/third_party/git/t/t6041-bisect-submodule.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/t6041-bisect-submodule.sh')
-rwxr-xr-xthird_party/git/t/t6041-bisect-submodule.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/third_party/git/t/t6041-bisect-submodule.sh b/third_party/git/t/t6041-bisect-submodule.sh
index 62b8a2e7bbd1..df1eff0fb831 100755
--- a/third_party/git/t/t6041-bisect-submodule.sh
+++ b/third_party/git/t/t6041-bisect-submodule.sh
@@ -10,7 +10,12 @@ git_bisect () {
 	ls -1pR * >>expect &&
 	tar cf "$TRASH_DIRECTORY/tmp.tar" * &&
 	GOOD=$(git rev-parse --verify HEAD) &&
-	git checkout "$1" &&
+	may_only_be_test_must_fail "$2" &&
+	$2 git checkout "$1" &&
+	if test -n "$2"
+	then
+		return
+	fi &&
 	echo "foo" >bar &&
 	git add bar &&
 	git commit -m "bisect bad" &&
@@ -27,6 +32,6 @@ git_bisect () {
 	git bisect bad $BAD
 }
 
-test_submodule_switch "git_bisect"
+test_submodule_switch_func "git_bisect"
 
 test_done