summaryrefslogtreecommitdiff
path: root/t/t6041-bisect-submodule.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6041-bisect-submodule.sh')
-rwxr-xr-xt/t6041-bisect-submodule.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/t/t6041-bisect-submodule.sh b/t/t6041-bisect-submodule.sh
index 62b8a2e7bb..82013fc903 100755
--- a/t/t6041-bisect-submodule.sh
+++ b/t/t6041-bisect-submodule.sh
@@ -8,9 +8,14 @@ test_description='bisect can handle submodules'
git_bisect () {
git status -su >expect &&
ls -1pR * >>expect &&
- tar cf "$TRASH_DIRECTORY/tmp.tar" * &&
+ "$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" &&
@@ -20,13 +25,13 @@ git_bisect () {
git bisect start &&
git bisect good $GOOD &&
rm -rf * &&
- tar xf "$TRASH_DIRECTORY/tmp.tar" &&
+ "$TAR" xf "$TRASH_DIRECTORY/tmp.tar" &&
git status -su >actual &&
ls -1pR * >>actual &&
test_cmp expect actual &&
git bisect bad $BAD
}
-test_submodule_switch "git_bisect"
+test_submodule_switch_func "git_bisect"
test_done