lint-history: avoid dying when we get file deletions

When a file is deleted, there is nothing to lint, so we can just keep
the deletion as-is.

Reported-by: Thorben Kröger <dev@thorben.net>
Signed-off-by: Elijah Newren <newren@gmail.com>
pull/55/head
Elijah Newren 4 years ago
parent 4ea19c0bf8
commit 9d3d99593c

@ -59,6 +59,8 @@ def lint_with_real_filenames(commit, metadata):
for change in commit.file_changes:
if change.blob_id in blobs_handled:
change.blob_id = blobs_handled[change.blob_id]
elif change.type == b'D':
continue
else:
# Get the old blob contents
cat_file_process.stdin.write(change.blob_id + b'\n')

Loading…
Cancel
Save