Re: gitk patch collection pull request
- From
Paul Mackerras <paulus@samba.org>
- Date
- Oct 23, 2007, 00:20 UTC
- Message-ID
- <18205.15967.792413.775786@cargo.ozlabs.ibm.com>
- In-Reply-To
- <alpine.LFD.0.999.0710192149020.3794@woody.linux-foundation.org>
Linus Torvalds writes:
Show 9 quoted lines
> On Sat, 20 Oct 2007, Paul Mackerras wrote: > > > > 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.
Show 6 quoted lines
> > 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.