]> git.phdru.name Git - git-scripts.git/blobdiff - set-commit-date.py
Refactor(set-commit-date.py): Combine 2 conditions
[git-scripts.git] / set-commit-date.py
index 45302528606e7cc40398a647b87c94a1111668ee..a88c5dea43849ddba38a0272f6ce74a24ac9a995 100755 (executable)
@@ -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):