Thanks, Daan!
I somehow missed this e-mail, so just read it now.
On Fri, Mar 14, 2014 at 4:24 PM, Daan Hoogland wrote:
> anybody gave it apin?
>
> just put it in your local .git/hooks/prepare-commit-msg and it should
> do its job. It's job is to do nothing if you don't add or update any
> files
anybody gave it apin?
just put it in your local .git/hooks/prepare-commit-msg and it should
do its job. It's job is to do nothing if you don't add or update any
files that end with .sql and to add the tag [DB-CHANGE] to the commit
message if you do.
I would like some feedback before I apply. Like
H,
I concocted a git prepare-commit-msg hook.
Please rant about my evening hobby after testing and reading
DB=`git status | grep -e "modified.*\.sql$" -e "new file.*\.sql$"`
OLD_MSG=`cat $1`
if [ -z "$DB" ]
then
MSG="[DB-CHANGE] $OLD_MSG"
else
MSG="$OLD_MSG"
fi
echo "$MSG" >$1
regards,
--