From f2c16538bf057e875129bf41b8a28adc7e406310 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Wed, 2 Jan 2013 14:20:21 +1100 Subject: [PATCH] Avoid code reviews for minor translation changes. If the only changes are the creation date or comments, don't send a review. Resolves bug 1095183. Change-Id: Idbc3f313d32b60563f4eff5fd97784a25fb8c428 Reviewed-on: https://review.openstack.org/18803 Reviewed-by: Clark Boylan Reviewed-by: Jeremy Stanley Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- .../jenkins/files/slave_scripts/propose_translation_update.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/jenkins/files/slave_scripts/propose_translation_update.sh b/modules/jenkins/files/slave_scripts/propose_translation_update.sh index b6d18279ac..a2f9356882 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update.sh @@ -43,7 +43,9 @@ fi # Add all changed files to git git add $PROJECT/locale/* -if [ ! `git diff-index --quiet HEAD --` ] +# Don't send a review if the only things which have changed are the creation +# date or comments. +if [ `git diff --cached | egrep -v "(POT-Creation-Date|^[\+\-]#|^\+{3}|^\-{3})" | egrep -c "^[\-\+]"` -gt 0 ] then # Commit and review git commit -F- <