From: Junio C Hamano Date: Fri, 2 Sep 2011 20:18:37 +0000 (-0700) Subject: Merge branch 'bc/bisect-test-use-shell-path' X-Git-Tag: v1.7.7-rc1~14 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8e969454e1588e506df20f552aa8622b6517ea20?ds=inline;hp=-c Merge branch 'bc/bisect-test-use-shell-path' * bc/bisect-test-use-shell-path: t6030: use $SHELL_PATH to invoke user's preferred shell instead of bare sh --- 8e969454e1588e506df20f552aa8622b6517ea20 diff --combined t/t6030-bisect-porcelain.sh index 62125eca81,cd9de634a1..c6f1f9f8ab --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect-porcelain.sh @@@ -592,37 -592,6 +592,37 @@@ test_expect_success 'erroring out when grep "bad path parameters" error.txt ' +test_expect_success 'test bisection on bare repo - --no-checkout specified' ' + git clone --bare . bare.nocheckout && + ( + cd bare.nocheckout && + git bisect start --no-checkout && + git bisect good $HASH1 && + git bisect bad $HASH4 && + git bisect run eval \ + "test \$(git rev-list BISECT_HEAD ^$HASH2 --max-count=1 | wc -l) = 0" \ + >../nocheckout.log && + git bisect reset + ) && + grep "$HASH3 is the first bad commit" nocheckout.log +' + + +test_expect_success 'test bisection on bare repo - --no-checkout defaulted' ' + git clone --bare . bare.defaulted && + ( + cd bare.defaulted && + git bisect start && + git bisect good $HASH1 && + git bisect bad $HASH4 && + git bisect run eval \ + "test \$(git rev-list BISECT_HEAD ^$HASH2 --max-count=1 | wc -l) = 0" \ + >../defaulted.log && + git bisect reset + ) && + grep "$HASH3 is the first bad commit" defaulted.log +' + # # This creates a broken branch which cannot be checked out because # the tree created has been deleted. @@@ -732,7 -701,7 +732,7 @@@ test_expect_success 'bisect: demonstrat git bisect reset && git checkout broken && git bisect start broken master --no-checkout && - git bisect run sh -c ' + git bisect run \"\$SHELL_PATH\" -c ' GOOD=\$(git for-each-ref \"--format=%(objectname)\" refs/bisect/good-*) && git rev-list --objects BISECT_HEAD --not \$GOOD >tmp.\$\$ && git pack-objects --stdout >/dev/null < tmp.\$\$