summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ec2b69)
raw | patch | inline | side by side (parent: 7ec2b69)
author | Jeff Epler <jepler@unpythonic.net> | |
Tue, 8 Dec 2009 00:22:42 +0000 (18:22 -0600) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 23 Jan 2010 23:00:09 +0000 (15:00 -0800) |
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: Jeff Epler <jepler@unpythonic.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
@@
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: Jeff Epler <jepler@unpythonic.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/diff.tcl | patch | blob | history |
diff --git a/lib/diff.tcl b/lib/diff.tcl
index bd5d189ed1ec1a6520b7e9fefc4d5d6f36b9a007..066755b864b587e073a820aa2eb729a6c930d7b0 100644 (file)
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
}
set i_l $next_l
}
+ set patch "$patch$pre_context"
set patch "@@ -$hln,$n +$hln,[eval expr $n $sign 1] @@\n$patch"
if {[catch {