From a0f5c1217294a1a72b71bc94fd80760b0393e775 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 3 Aug 2019 14:22:42 +0300 Subject: [PATCH] Refactor(set-commit-date.py): Combine 2 conditions --- set-commit-date.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/set-commit-date.py b/set-commit-date.py index 4530252..a88c5de 100755 --- a/set-commit-date.py +++ b/set-commit-date.py @@ -43,9 +43,9 @@ for line in git_log.stdout: filename = line.split(None, 2)[1] elif line.startswith('R'): filename = line.split(None, 3)[2] # renamed to - if line.startswith('D'): - if filename not in changed_files: # The file was not readded - deleted_files.add(filename) + if line.startswith('D') and filename not in changed_files: + # The file was not readded + deleted_files.add(filename) if filename not in deleted_files and filename not in changed_files: changed_files.add(filename) if os.path.exists(filename): -- 2.39.2