Ignore last-translator for translation update trigger

Do not import a file if the Last-Translator line has changed (together
with other ignored lines).

This will ignore imports like
https://review.openstack.org/#/c/183771/1/doc/glossary/locale/ja.po

If there are other changes, including real translations, the file will
get imported as usual.

Change-Id: I6f56f64c107e4f93b92460612e656b91341a8338
This commit is contained in:
Andreas Jaeger 2015-05-16 09:59:33 +02:00
parent 7d43323978
commit 05b95e5434

@ -316,7 +316,7 @@ function filter_commits {
# Don't send files where the only things which have changed are
# the creation date, the version number, the revision date,
# comment lines, or diff file information.
# name of last translator, comment lines, or diff file information.
# Also, don't send files if only .pot files would be changed.
PO_CHANGE=0
# Don't iterate over deleted files
@ -324,10 +324,10 @@ function filter_commits {
# It's ok if the grep fails
set +e
changed=$(git diff --cached "$f" \
| egrep -v "(POT-Creation-Date|Project-Id-Version|PO-Revision-Date)" \
| egrep -v "(POT-Creation-Date|Project-Id-Version|PO-Revision-Date|Last-Translator)" \
| egrep -c "^([-+][^-+#])")
added=$(git diff --cached "$f" \
| egrep -v "(POT-Creation-Date|Project-Id-Version|PO-Revision-Date)" \
| egrep -v "(POT-Creation-Date|Project-Id-Version|PO-Revision-Date|Last-Translator)" \
| egrep -c "^([+][^+#])")
set -e
if [ $changed -eq 0 ]; then