#!/usr/bin/env bash set -e # First check that the search target represented by the ack args are present at HEAD ACK_ARGS="$@" if ! ack -1 $ACK_ARGS; then echo "Error: search target '$ACK_ARGS' not found at HEAD" echo "Tip: checkout a revision containing the search target and try again." exit 1 fi SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) git bisect start HEAD $(git rev-list --max-parents=0 HEAD) git bisect run $SCRIPT_DIR/noack.sh $ACK_ARGS git bisect reset