Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 30 lines (22 sloc) 520 Bytes
#!/bin/sh
# Run a command over a sequence of commits.
# Example:
# git test-sequence origin/master.. 'make clean && make test'
start_branch=`git rev-parse --symbolic-full-name HEAD | sed s,refs/heads/,,`
tmpbranch=test_seq_$$
git checkout -b $tmpbranch
cleanup() {
git checkout $start_branch
git branch -D $tmpbranch
}
broke_on() {
echo "Broke on $v"
cleanup
exit 1
}
for v in `git rev-list --reverse $1`
do
git reset --hard $v && eval "$2" || broke_on $v
done
cleanup
echo "All's well."
Jump to Line
Something went wrong with that request. Please try again.