summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/repo/base.py')
-rw-r--r--git/repo/base.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index b889da71..fa9cb596 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -713,11 +713,14 @@ class Repo(object):
committed_date=int(props[b'committer-time']))
commits[hexsha] = c
else:
- # Discard the next line (it's a filename end tag)
- line = next(stream)
- tag, value = line.split(b' ', 1)
- assert tag == b'filename', 'Unexpected git blame output'
- orig_filename = value
+ # Discard all lines until we find "filename" which is
+ # guaranteed to be the last line
+ while True:
+ line = next(stream)
+ tag, value = line.split(b' ', 1)
+ if tag == b'filename':
+ orig_filename = value
+ break
yield BlameEntry(commits[hexsha],
range(lineno, lineno + num_lines),