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

Re: Clarifying behavior of diff --stat

From
Jeff King <peff@peff.net>
Date
Jun 9, 2017, 05:21 UTC
Message-ID
<20170609052121.f5fudcq6yz5d3r56@sigill.intra.peff.net>
In-Reply-To
<CAJZjrdUHm2JAGsjurcGxONQomAtvV_GMgzqb0pPEovHSySd=KA@mail.gmail.com>
On Thu, Jun 08, 2017 at 07:10:00AM -0400, Samuel Lijin wrote:
> I noticed when answering a StackOverflow question that apparently
> --stat modifies the raw diff itself, instead of just adding a diffstat
> to the output. In the linux kernel:

Sort of. Using "--stat" implies "-r", since it only deals with the actual blobs and would have nothing to show for tree entries.

And since recursive-ness is global to the whole diff, not just one output format, the --raw output becomes recursive, too.

> Is this intentional? And is there a way to generate a raw version of
> the extended stat without using --stat?
Try "git diff-tree --raw -r".
-Peff
Previous: Samuel Lijin
Message 2 of 2 in “Clarifying behavior of diff --stat”
  1. Samuel LijinJun 8, 2017
  2. Jeff KingJun 9, 2017

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.