Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t6041-bisect-submodule.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t6041-bisect-submodule.sh` 37 lines ยท 782 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='bisect can handle submodules' 4 5 . ./test-lib.sh 6 . "$TEST_DIRECTORY"/lib-submodule-update.sh 7 8 git_bisect () { 9 git status -su >expect && 10 ls -1pR * >>expect && 11 "$TAR" cf "$TRASH_DIRECTORY/tmp.tar" * && 12 GOOD=$(git rev-parse --verify HEAD) && 13 may_only_be_test_must_fail "$2" && 14 $2 git checkout "$1" && 15 if test -n "$2" 16 then 17 return 18 fi && 19 echo "foo" >bar && 20 git add bar && 21 git commit -m "bisect bad" && 22 BAD=$(git rev-parse --verify HEAD) && 23 git reset --hard HEAD^^ && 24 git submodule update && 25 git bisect start && 26 git bisect good $GOOD && 27 rm -rf * && 28 "$TAR" xf "$TRASH_DIRECTORY/tmp.tar" && 29 git status -su >actual && 30 ls -1pR * >>actual && 31 test_cmp expect actual && 32 git bisect bad $BAD 33 } 34 35 test_submodule_switch_func "git_bisect" 36 37 test_done