Fix wrong check for empty files

The condition needs to be negated, we want to remove files
where the grep for non-empty lines does not succeed.

Change-Id: I0111bedcd3bb4affde8b9bd7cd2a21e6849c1513
This commit is contained in:
Andreas Jaeger 2014-09-26 10:45:00 +02:00
parent 6820612515
commit 103970ddf9

View File

@ -290,7 +290,7 @@ function filter_commits ()
for f in `git diff --cached --name-only --diff-filter=A`
do
# Files should have at least one non-empty msgid string.
if grep -q 'msgid "[^"]' "$f" ; then
if ! grep -q 'msgid "[^"]' "$f" ; then
git reset -q "$f"
rm "$f"
fi