Handle missing pot files in translation proposal
searchlight project had only one pot file but not the other five that are expected. The filter_commit function was filtering out the newly added file and run "git checkout -- NEWFILE" which failed. Make the script more robust so that it handles newly added files correctly. Change-Id: I4a7a8ab9b75f310992b7232920206d4ddc041268
This commit is contained in:
parent
344bdf1faf
commit
b2c02a9e52
@ -352,6 +352,11 @@ function filter_commits {
|
||||
# and those changes can be ignored as they give no benefit on
|
||||
# their own.
|
||||
if [ $PO_CHANGE -eq 0 ] ; then
|
||||
# New files need to be handled differently
|
||||
for f in $(git diff --cached --name-only --diff-filter=A) ; do
|
||||
git reset -q -- "$f"
|
||||
rm "$f"
|
||||
done
|
||||
for f in $(git diff --cached --name-only) ; do
|
||||
git reset -q -- "$f"
|
||||
git checkout -- "$f"
|
||||
|
Loading…
x
Reference in New Issue
Block a user