]> git.droids-corp.org - git-central.git/commitdiff
Fix suppressing the exit value.
authorStephen Haberman <shaberman@payflex.com>
Mon, 23 Jun 2008 20:36:54 +0000 (15:36 -0500)
committerStephen Haberman <shaberman@payflex.com>
Mon, 23 Jun 2008 20:36:54 +0000 (15:36 -0500)
server/pre-receive-trac

index 2e57e5841efecbb3772fd305e20b9e27776ad238..5fea3d95721659f7d387fbb93c300462907cf7a5 100644 (file)
@@ -8,11 +8,13 @@ while read oldrev newrev refname ; do
                git rev-parse --not --branches | grep -v $(git rev-parse $refname) | git rev-list --stdin --no-merges $oldrev..$newrev
        fi | while read commit ; do
                git log -n 1 '--pretty=format:%s%n%b' "$commit" | grep -i '\(\(re\|refs\|qa\) #[0-9]\+\)\|\(no ticket\)' > /dev/null
-               if [ $? -ne 0 ]
-               then
+               if [ $? -ne 0 ] ; then
                        echo "Commit $commit does not reference a ticket"
                        exit 1
                fi
        done
+       if [ $? -ne 0 ] ; then
+               exit 1
+       fi
 done