Jon Seymour <jon.seymour@xxxxxxxxx> writes: > This extension to js/bisect-no-checkout adds support for bisecting bare repositories. > > It does this by relaxing the requirement that git bisect is invoked in a repository with a working tree and by defaulting to --no-checkout in the case of a bare repository. > > Two tests are included to demonstrate this behaviour. I'd wrap the long line myself but next time please be careful. > diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh > index 4fb7d11..62125ec 100755 > --- a/t/t6030-bisect-porcelain.sh > +++ b/t/t6030-bisect-porcelain.sh > @@ -592,6 +592,37 @@ test_expect_success 'erroring out when using bad path parameters' ' > 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 > +' git-bisect does not have any cd_to_toplevel so with a working tree you can run a bisection from a subdirectory, it seems. I wonder what would happen if you did "cd bare.nocheckout/objects" or something silly like that. Just wondering... -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html