This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# check commit messages for pivotal tracker issue numbers formatted as [#stort-id]along with commit message | |
REGEX="\[#[0-9]*\]" | |
ERROR_MSG="[POLICY] The commit doesn't reference a PIVOTAL tracker issue" | |
while read OLDREV NEWREV REFNAME ; do | |
for COMMIT in `git rev-list $OLDREV..$NEWREV`; | |
do | |
MESSAGE=`git cat-file commit $COMMIT | sed '1,/^$/d'` |