Re: [RFD] Strange patch formats (aka tricks with unified diffs)..
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:43:04
On Fri, 13 Apr 2007, Paul Mackerras wrote:
Linus Torvalds writes:quoted
- bug Paul about alternate diff viewing capabilities in gitk. He's cc'd here. A way to make the "diff" pane show just the new one, the old one, or even both side-by-side with some mousy interface?Showing just the old lines, or just the new lines, would be dead easy, since the Tk text widget has an "elide" option on tagged ranges of text that effectively removes them from the display. So I don't even have to change the contents of the text widget, merely the display options associated with the tags that I already have attached to the old and new lines (that's how they get their color).
Ok, just a radio button for the patch case for "show patch" vs "show result" would certainly be sufficient for what I normally do. Adding the case "show origin" for completeness (ie filter out the new lines, rather than filtering out the old lines) is probably a good idea, even if I've never used it.
Side-by-side would be more challenging.
Not a biggie. I've used kdiff3 etc in the past, and they do a good job of it and it "looks cool", but I've never done it on a command line which means that in practice _I_ don't use it. Maybe other people do.
Have you seen what dirdiff can do with displaying diffs? You can expose more context, move old and new lines up and down (but not in a manner which changes the meaning of the diff), and split context lines into old/new pairs, all with the mouse.
I've never used dirdiff. Sounds a bit like what kdiff3 does. Linus