Skip to content

Commit 3c50ada

Browse files
committed
Count binary files as zero insertions
Hyphens are the only nonn-numeric characters that should show up here. See: https://git-scm.com/docs/git-log#Documentation/git-log.txt---numstat
1 parent 9abc0cc commit 3c50ada

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jupyterlab_git/git.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ async def detailed_log(self, selected_hash, current_path):
330330
line_iterable = iter(strip_and_split(my_output)[1:])
331331
for line in line_iterable:
332332
insertions, deletions, file = line.split('\t')
333+
insertions = insertions.replace('-', '0')
334+
deletions = deletions.replace('-', '0')
333335

334336
if file == '':
335337
# file was renamed or moved, we need next two lines of output

0 commit comments

Comments
 (0)