Re: [PATCH] git log [diff-tree options]...
- From
Junio C Hamano <junkio@cox.net>
- Date
- Apr 9, 2006, 18:46 UTC
- Message-ID
- <7vbqvabn8f.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0604090950590.9504@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 5 quoted lines
> I wonder... This all looks fine, but there are actually two different > "diffs" that can be shown for "git log --diff <pathlimiter>": > > - the whole diff for a commit > - the path-limited diff
Yes, exactly the same way sometimes you would want just pickaxe, sometimes you would want it with --pickaxe-all.
Also, I might have to rethink --max-count logic -- I think it is reasonable to skip the commit when doing limiting by diff like "whatchanged" does, but one thing I find suboptimal with the current whatchanged is that it does not count commits that are actually shown (it counts what the upstream rev-list feeds diff-tree). With the "git log --diff" based whatchanged, it becomes trivial to skip the revs->max_count limiting and have the caller count the commits it actually does something user-visible to, instead of counting the commits it pulled out of get_revision().
BTW I think I could remove the log message generation part of "git log" and have it use the one in log-tree (which I will probably rewrite not to format the message into the static this_header[] buffer when it is not shown).
Another thing that might be useful is to teach diff-* to do the diffstat part internally. After that is in place we could introduce --pretty=patch to have "git log" produce format-patch compatible output.