Merge branch 'bc/http-fallback-to-password-after-krb-fails' into maint
[git/mingw/j6t.git] / t / t6041-bisect-submodule.sh
blobc6b7aa6977e0a5a1017c759d93f8883cad3713b0
1 #!/bin/sh
3 test_description='bisect can handle submodules'
5 . ./test-lib.sh
6 . "$TEST_DIRECTORY"/lib-submodule-update.sh
8 git_bisect () {
9 git status -su >expect &&
10 ls -1pR * >>expect &&
11 tar czf "$TRASH_DIRECTORY/tmp.tgz" * &&
12 GOOD=$(git rev-parse --verify HEAD) &&
13 git checkout "$1" &&
14 echo "foo" >bar &&
15 git add bar &&
16 git commit -m "bisect bad" &&
17 BAD=$(git rev-parse --verify HEAD) &&
18 git reset --hard HEAD^^ &&
19 git submodule update &&
20 git bisect start &&
21 git bisect good $GOOD &&
22 rm -rf * &&
23 tar xzf "$TRASH_DIRECTORY/tmp.tgz" &&
24 git status -su >actual &&
25 ls -1pR * >>actual &&
26 test_cmp expect actual &&
27 git bisect bad $BAD
30 test_submodule_switch "git_bisect"
32 test_done