mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
patch: a little bit more robust line counting on diff --stat (issue3183)
This commit is contained in:
parent
16484a55ad
commit
9146d99b1d
@ -1802,9 +1802,9 @@ def diffstatdata(lines):
|
||||
elif line.startswith('diff -r'):
|
||||
# format: "diff -r ... -r ... filename"
|
||||
filename = diffre.search(line).group(1)
|
||||
elif line.startswith('+') and not line.startswith('+++'):
|
||||
elif line.startswith('+') and not line.startswith('+++ '):
|
||||
adds += 1
|
||||
elif line.startswith('-') and not line.startswith('---'):
|
||||
elif line.startswith('-') and not line.startswith('--- '):
|
||||
removes += 1
|
||||
elif (line.startswith('GIT binary patch') or
|
||||
line.startswith('Binary file')):
|
||||
|
Loading…
Reference in New Issue
Block a user