Ignore deleted files using '--modified' option (#28)

This commit is contained in:
Álvaro Mondéjar 2021-04-13 18:33:44 +02:00 committed by GitHub
parent d7468aacb1
commit 23eb401584
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -442,7 +442,7 @@ def main():
)
if args.modified:
git_status = subprocess.check_output(
["git", "status", "--porcelain"], encoding="utf-8"
["git", "status", "--porcelain", "--no-renames"], encoding="utf-8"
)
git_status_lines = [
line.split(maxsplit=2) for line in git_status.split("\n") if line
@ -450,7 +450,7 @@ def main():
args.po_file.extend(
Path(filename)
for status, filename in git_status_lines
if filename.endswith(".po")
if filename.endswith(".po") and status != "D"
)
try:
errors = spell_check(