X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=set-commit-date.py;h=71594ae3899e896a2d50901d7bf873178b7fdf0c;hb=b65933557c112aa3d14b4664d70b7260e836e64e;hp=dc6a5fb732d93a0499323e9197305797a24172d8;hpb=a78cda4ceab33318042626138aaf727a2fa871c0;p=git-scripts.git diff --git a/set-commit-date.py b/set-commit-date.py index dc6a5fb..71594ae 100755 --- a/set-commit-date.py +++ b/set-commit-date.py @@ -18,10 +18,7 @@ git_log = subprocess.Popen(['git', 'log', '-m', '--first-parent', 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