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

Re: git log --stat FILE

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 8, 2010, 13:08 UTC
Message-ID
<201008081508.53732.jnareb@gmail.com>
In-Reply-To
<yf9bp9ds2mz.fsf@chiyo.mc.pp.se>
Marcus Comstedt wrote:
Show 13 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
> > Diffstat is just a diff format (a way of presenting diff); '--stat'
> > is described in "Common _diff_ options" of git-log(1) manpage.
> >
> > But whats obvious to me might not be obvious to everyone.
> 
> To me (and probably many others), a "diff" is the output of the
> command "/usr/bin/diff".  I notice that git seems to refer to this as
> a "patch" instead.  Nevertheless, the documentation of --full-diff
> explicitly talks about "log -p", rather than "diffs" in general.  So
> it's not clear from the documentation that it affects other types of
> diffs than those produced by -p ("patches").

To me (and probably many others), a "diff" is something that describe differences between two versions (compares two version). Note that 'GNU diff' (and other "/usr/bin/diff") supports three output formats: ed based, context and unified formats. git-diff supports patch format (unified, with some extensions), raw aka diff-tree format, and various versions of diffstat format.

The '--full-diff' is a git-log option, not diff option, as it affects how git-log uses path limiter. "git log -p <path>..." is an example of copmmand that shows diffs with commits, as "git log <path>..." alone doesn't show diffs (in any format). But perhaps the description of '--full-diff' option could be improved.

The '--stat' is git-diff option, as you can see by running e.g. "git diff --stat HEAD^!"

-- 
Jakub Narebski
Poland
Previous: Marcus ComstedtNext: Marcus Comstedt
Message 7 of 11 in “git log --stat FILE”
  1. Marcus ComstedtAug 8, 2010
  2. Jakub NarebskiAug 8, 2010
  3. Lars HjemliAug 8, 2010
  4. Marcus ComstedtAug 8, 2010
  5. Jakub NarebskiAug 8, 2010
  6. Marcus ComstedtAug 8, 2010
  7. Jakub NarebskiAug 8, 2010
  8. Marcus ComstedtAug 8, 2010
  9. Documentation/git-log: Clarify --full-diffMichael J Gruber, Aug 8, 2010
  10. Matthieu MoyAug 9, 2010
  11. Junio C HamanoAug 9, 2010

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.