git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git log [diff-tree options]...

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 9, 2006, 19:02 UTC
Message-ID
<Pine.LNX.4.64.0604091158310.9504@g5.osdl.org>
In-Reply-To
<7vbqvabn8f.fsf@assigned-by-dhcp.cox.net>
On Sun, 9 Apr 2006, Junio C Hamano wrote:
Show 11 quoted lines
> 
> 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().

Well, on the other hand, the new "git log --diff" should get the revision counting right even if it's _not_ done by the caller.

Really, the only reason "git-whatchanged" exists at all is that it used to be originally impossible, and later on too expensive to do the commit- limiting by pathname. With the new incremental path-limiting, the reason for "git-whatchanged" simply goes away.

So I'd suggest:
 - drop git-whatchanged entirely
 - keep it - for historical reasons - as a internal shorthand, and just 
   turn it into "git log --diff -cc"

and everybody will be happy (yeah, it will show a few merge commits without diffs, because the diffs end up being uninteresting, but that's _fine_, even if it's not 100% the same thing git-whatchanged used to do)

			Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 22 in “git log [diff-tree options]...”
  1. git log [diff-tree options]...Junio C Hamano, Apr 9, 2006
  2. Junio C HamanoApr 9, 2006
  3. Linus TorvaldsApr 9, 2006
  4. Junio C HamanoApr 9, 2006
  5. Linus TorvaldsApr 9, 2006
  6. Junio C HamanoApr 9, 2006
  7. Linus TorvaldsApr 9, 2006
  8. Johannes SchindelinApr 9, 2006
  9. Johannes SchindelinApr 9, 2006
  10. Timo HirvonenApr 9, 2006
  11. Johannes SchindelinApr 10, 2006
  12. Junio C HamanoApr 9, 2006
  13. Linus TorvaldsApr 10, 2006
  14. Johannes SchindelinApr 10, 2006
  15. Randal L. SchwartzApr 11, 2006
  16. Junio C HamanoApr 11, 2006
  17. Petr BaudisApr 11, 2006
  18. Randal L. SchwartzApr 11, 2006
  19. Junio C HamanoApr 10, 2006
  20. tree-diff: do not assume we use only one pathspecJunio C Hamano, Apr 10, 2006
  21. git log --full-diffJunio C Hamano, Apr 10, 2006
  22. Linus TorvaldsApr 10, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.