Skip to content

Instantly share code, notes, and snippets.

@nacin
Created January 25, 2012 00:27
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 nacin/1673766 to your computer and use it in GitHub Desktop.
Save nacin/1673766 to your computer and use it in GitHub Desktop.
Require `svn ci -m` calls to have explicit files
#!/bin/sh
function svn() {
if [ "$1" == "ci" ] && [ "$2" == "-m" ] && [ -z "$4" ] && [ "$(svn stat --ignore-externals | grep '^[^?X]' | wc -l | awk '{print $1}')" -gt 1 ]; then
svn stat --ignore-externals | grep '^[^?X]'
echo ""
echo $3
echo ""
echo "Unbounded commit... What are you doing, man?"
else
/usr/bin/svn "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment