Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
This commit is contained in:
commit
1b593e1ea4
3629 changed files with 1139935 additions and 0 deletions
32
t/t6041-bisect-submodule.sh
Executable file
32
t/t6041-bisect-submodule.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='bisect can handle submodules'
|
||||
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-submodule-update.sh
|
||||
|
||||
git_bisect () {
|
||||
git status -su >expect &&
|
||||
ls -1pR * >>expect &&
|
||||
tar cf "$TRASH_DIRECTORY/tmp.tar" * &&
|
||||
GOOD=$(git rev-parse --verify HEAD) &&
|
||||
git checkout "$1" &&
|
||||
echo "foo" >bar &&
|
||||
git add bar &&
|
||||
git commit -m "bisect bad" &&
|
||||
BAD=$(git rev-parse --verify HEAD) &&
|
||||
git reset --hard HEAD^^ &&
|
||||
git submodule update &&
|
||||
git bisect start &&
|
||||
git bisect good $GOOD &&
|
||||
rm -rf * &&
|
||||
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_done
|
||||
Loading…
Add table
Add a link
Reference in a new issue