Ignore only source file changes for translations
Do not propose a new patch set, if only the source files (.pot) have changed and no translated po file was changed. This will reduce the number of patches. Example: https://review.openstack.org/#/c/119537/1 Change-Id: I3f21dd0bc4ddb0ae9d8732590b1824f6171d2d7f
This commit is contained in:
parent
afa774813d
commit
cfb037576b
@ -265,8 +265,12 @@ 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.
|
||||
PO_CHANGE=0
|
||||
for f in `git diff --cached --name-only`
|
||||
do
|
||||
if [[ $f =~ "\.po$" ]] ; then
|
||||
PO_CHANGE=1
|
||||
fi
|
||||
# It's ok if the grep fails
|
||||
set +e
|
||||
changed=$(git diff --cached "$f" \
|
||||
@ -279,4 +283,13 @@ function filter_commits ()
|
||||
git checkout -- "$f"
|
||||
fi
|
||||
done
|
||||
# If no po file was changed, only pot source files were changed
|
||||
# and those changes can be ignored as they give no benefit on
|
||||
# their own.
|
||||
if [ $PO_CHANGE -eq 0 ] ; then
|
||||
for f in `git diff --cached --name-only` ; do
|
||||
git reset -q "$f"
|
||||
git checkout -- "$f"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user