#!/usr/bin/env bash1#2# Use this script to drive `git bisect run` to find the commit that introduced a behavior:3#4# - create a test that fails5# - `git bisect start`6# - `git bisect new` to mark the current commit as the new behavior7# - Find a commit that is known to have the old and run `git bisect old` from there8# - `git bisect run tests/git-bisect-test.sh <test-name> [flip]`9# - if `flip` is passed as the second argument, the script will return 1 on10# success and 0 on failure, so that the bisect will find the first commit11# that passes the test rather than the first commit that fails it1213./configure.sh14cd tests15./run-fast-tests.sh $11617result=$?1819if [ "$2" == "flip" ]; then20if [ $result -eq 0 ]; then21exit 122else23exit 024fi25else26if [ $result -eq 0 ]; then27exit 028else29exit 130fi31fi3233