#!/bin/rc
if (test `{git rev-parse --abbrev-ref HEAD} "!=" master) {
	echo "Error: not on master branch"
	exit 1
}
if (test `{git status -suno | wc -l} -ne 0) {
	echo "Error: you have uncommitted changes"
	exit 1
}
if (test `{git rev-list "@{u}.." | wc -l} -ne 0) {
	echo "Error: your branch is behind upstream"
	exit 1
}
git pull
