8 if expr "$oldrev" : '0*$' >/dev/null ; then
9 git rev-parse --not --branches | git rev-list --stdin --no-merges $newrev
11 git rev-parse --not --branches | git rev-list --stdin --no-merges $oldrev..$newrev
12 fi | while read commit ; do
13 # Have log dump the "subject line, new line, body" of each commit message for grepping
14 git log -n 1 '--pretty=format:%s%n%b' "$commit" | grep -i '\(\(re\|refs\|qa\) #[0-9]\+\)\|\(no ticket\)' > /dev/null
15 if [ $? -ne 0 ] ; then
16 echo "----------------------------------------------------" >&2
18 echo "Commit $commit does not reference a ticket" >&2
20 echo "----------------------------------------------------" >&2