cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daan Hoogland <daan.hoogl...@gmail.com>
Subject review request hook for git
Date Thu, 13 Mar 2014 21:56:41 GMT
H,

I concocted a git prepare-commit-msg hook.

Please rant about my evening hobby after testing and reading

<script>
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
</script>

regards,
-- 
Daan

Mime
View raw message