Skip to content

Instantly share code, notes, and snippets.

@justanotherdot
Last active June 24, 2020 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justanotherdot/d587f5bea0f6937ef7f7bda53f23ac56 to your computer and use it in GitHub Desktop.
Save justanotherdot/d587f5bea0f6937ef7f7bda53f23ac56 to your computer and use it in GitHub Desktop.
Only run bisect tests on GitHub flavored merge quests.
#!/bin/sh -eu
FROM_COMMIT="$1"
TO_COMMIT="$2"
git bisect start "$FROM_COMMIT" "$TO_COMMIT"
git bisect run ./bisect-test && git bisect reset
#!/bin/sh -eu
MERGE_COMMITS=$(git log --pretty="format:%H %s" | grep 'Merge pull request' | awk '{print $1}' | xargs)
CURRENT_COMMIT="$(git rev-parse HEAD)"
[ ! echo "$MERGE_COMMITS" | grep "$CURRENT_COMMIT" ] && exit 125
./test || exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment