提交 390425bd 编写于 作者: J Jeff Epler 提交者: Shawn O. Pearce

git-gui: Fix applying a line when all following lines are deletions

If a diff looked like:

 @@
  context
 -del1
 -del2

and you wanted to stage the deletion 'del1', the generated patch
wouldn't apply because it was missing the line 'del2' converted to
context, but this line was counted in the @@-line
Signed-off-by: NJeff Epler <jepler@unpythonic.net>
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
上级 7ec2b69f
......@@ -664,6 +664,7 @@ proc apply_line {x y} {
}
set i_l $next_l
}
set patch "$patch$pre_context"
set patch "@@ -$hln,$n +$hln,[eval expr $n $sign 1] @@\n$patch"
if {[catch {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册