Re: gitk patch collection pull request
From: Paul Mackerras <hidden>
Date: 2016-06-15 22:43:44
Linus Torvalds writes:
On Sat, 20 Oct 2007, Paul Mackerras wrote:quoted
Do you mean that when you have a file limit, the diff window should just show the diffs for those files, not any other files the commit might have modified?Yes. The same way "git log -p" works by default. With perhaps a checkbox to toggle the "--full-diff" behaviour.
OK, done. The checkbox is in the Edit/Preferences window. It's called "Limit diffs to listed paths" and it's on by default.
quoted
That would be easy enough to implement in gitk.Well, the "--merged" case is slightly trickier, since git will figure out the pathnames on its own (it limits pathnames to the intersection of the names you give one the command line *and* the list of unmerged files, ie the "filter" becomes "git ls-files -u [pathspec]".
If you use the --merge flag, gitk will do a git ls-files -u at startup, and use the result as the list of paths (after intersecting it with the paths on the command line, if you specify paths there). I pondered whether I needed to re-do the git ls-files -u when you update the view with File->Update. I decided not to for now, but it would be possible to add it.
But goodie. I look forward to it ;)
I just pushed it out to my gitk.git repo (master branch). Enjoy. :) Paul.