Skip to content

Commit bb83656

Browse files
committed
Fix infinite loop in _build_line_mappings when reaching beginning of history
1 parent a770316 commit bb83656

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitbrowse/git.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ def _build_line_mappings(self, start, finish):
182182
sections = []
183183

184184
# Skip initial headers: They don't interest us.
185-
line = ''
186-
while not line.startswith('@@'):
185+
line = p.readline()
186+
while line != '' and not line.startswith('@@'):
187187
line = p.readline()
188188

189189
while line:

0 commit comments

Comments
 (0)