py3: fix absorb -i

Summary: The command does not crash but `-` lines are ignored.

Reviewed By: DurhamG

Differential Revision: D23357655

fbshipit-source-id: f48568bc193f947503bc19f3e192b33346c317e1
This commit is contained in:
Jun Wu 2020-08-26 17:18:58 -07:00 committed by Facebook GitHub Bot
parent e505d33da7
commit d60e80796a

View File

@ -879,7 +879,7 @@ def _parsechunk(hunk):
patchlines = mdiff.splitnewlines(buf.getvalue())
# hunk.prettystr() will update hunk.removed
a2 = a1 + hunk.removed
blines = [l[1:] for l in patchlines[1:] if l[0] != "-"]
blines = [l[1:] for l in patchlines[1:] if l[0] != b"-"]
return path, (a1, a2, blines)