filenames = set()
# stages: 1 - start of commit, 2 - timestamp, 3 - empty line, 4 - files
stage = 1
-while True:
- line = git_log.stdout.readline()
- if not line: # EOF
- break
+for line in git_log.stdout:
line = line.strip()
if (stage in (1, 4)) and (line == separator): # Start of a commit
stage = 2