Re: git log --stat FILE

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git log --stat FILE

From: Marcus Comstedt <hidden>
Date: 2016-06-15 22:49:16

Jakub Narebski [off-list ref] 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 obvoud 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").


  // Marcus

Re: git log --stat FILE

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:49:16

Marcus Comstedt wrote:
Jakub Narebski [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help