From 3b5203bb1ac0ec7c23d12684949432e59ac1a78a Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Mon, 23 Jun 2008 15:36:54 -0500 Subject: [PATCH] Fix suppressing the exit value. --- server/pre-receive-trac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/pre-receive-trac b/server/pre-receive-trac index 2e57e58..5fea3d9 100644 --- a/server/pre-receive-trac +++ b/server/pre-receive-trac @@ -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 -- 2.39.5