Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 27 lines (21 sloc) 0.607 kb
#!/bin/sh
# Run a command over a sequence of commits.
# Example:
# git test-once 'make clean && make compile && make test'
. "$(git --exec-path)/git-sh-setup"
require_work_tree
get_hash_input() {
echo "$1"
git rev-parse 'HEAD^{tree}'
git diff HEAD
}
already_passed() {
h=`get_hash_input "$1" | git hash-object --stdin`
git cat-file blob $h > /dev/null 2>/dev/null && echo "Already passed $h"
}
passed_on() {
h=`get_hash_input "$1" | git hash-object -w --stdin`
echo "Passed: $h."
}
echo "Testing $1"
already_passed "$1" || ( eval "$1" && passed_on "$1" ) || passed_on "$1"
Jump to Line
Something went wrong with that request. Please try again.