From 9d3d99593c88e0e0f6799c3bc83fa4a9c8f5cb01 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 6 Feb 2020 13:00:48 -0800 Subject: [PATCH] lint-history: avoid dying when we get file deletions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a file is deleted, there is nothing to lint, so we can just keep the deletion as-is. Reported-by: Thorben Kröger Signed-off-by: Elijah Newren --- contrib/filter-repo-demos/lint-history | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/filter-repo-demos/lint-history b/contrib/filter-repo-demos/lint-history index c8e4af6..e871676 100755 --- a/contrib/filter-repo-demos/lint-history +++ b/contrib/filter-repo-demos/lint-history @@ -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')