* 'git format-patch <ref> --summary' seems to be turning off the stat
@ 2017-12-16 18:57 Kaartic Sivaraam
2017-12-18 18:37 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Kaartic Sivaraam @ 2017-12-16 18:57 UTC (permalink / raw)
To: git
The documentation for "--summary" option in the format-patch Doc states,
--summary Output a condensed summary of extended header information such
as creations, renames and mode changes. It doesn't state anything about
turning of the stat. Why does the stat get turned off when "--summary"
option is used along with "git format-patch" ? Note: I do see that
"--summary" is a diff-option but does that mean we should't be printing
stat information in the patch when the user didn't mention "--no-stat"?
Yeah, "git format-patch <ref> --summary --stat" does bring back the
stat. --- Kaartic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 'git format-patch <ref> --summary' seems to be turning off the stat
2017-12-16 18:57 'git format-patch <ref> --summary' seems to be turning off the stat Kaartic Sivaraam
@ 2017-12-18 18:37 ` Junio C Hamano
2017-12-18 18:44 ` Kaartic Sivaraam
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2017-12-18 18:37 UTC (permalink / raw)
To: Kaartic Sivaraam; +Cc: git
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
> Note: I do see that "--summary" is a diff-option but does that mean we
> should't be printing stat information in the patch when the user
> didn't mention "--no-stat"? Yeah, "git format-patch <ref> --summary
> --stat" does bring back the stat. --- Kaartic
The old design decision shared across "log" family of commands [*1*]
wrt to these "how and what are shown" options is that they started
without any default set of options and the user gave all options (if
they want both summary and stat, they gave them from the command
line); over time they gained a set of built-in default options that
take effect only when the user gives no option.
So, yes, giving "--summary" will turn off the built-in ones that are
"--summary --stat" (IIRC).
[Footnote]
*1* "show" turns "-p" on by default, but with "show --stat" you can
get "--stat" without the patch. That comes from the same design.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 'git format-patch <ref> --summary' seems to be turning off the stat
2017-12-18 18:37 ` Junio C Hamano
@ 2017-12-18 18:44 ` Kaartic Sivaraam
0 siblings, 0 replies; 3+ messages in thread
From: Kaartic Sivaraam @ 2017-12-18 18:44 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Tuesday 19 December 2017 12:07 AM, Junio C Hamano wrote:
> Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
>
>> Note: I do see that "--summary" is a diff-option but does that mean we
>> should't be printing stat information in the patch when the user
>> didn't mention "--no-stat"? Yeah, "git format-patch <ref> --summary
>> --stat" does bring back the stat. --- Kaartic
>
> The old design decision shared across "log" family of commands [*1*]
> wrt to these "how and what are shown" options is that they started
> without any default set of options and the user gave all options (if
> they want both summary and stat, they gave them from the command
> line); over time they gained a set of built-in default options that
> take effect only when the user gives no option.
>
> So, yes, giving "--summary" will turn off the built-in ones that are
> "--summary --stat" (IIRC).
>
Is it worth documenting that built-in defaults are turned off when user
gives other options? Not sure where, though?
--
Kaartic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-18 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-16 18:57 'git format-patch <ref> --summary' seems to be turning off the stat Kaartic Sivaraam
2017-12-18 18:37 ` Junio C Hamano
2017-12-18 18:44 ` Kaartic Sivaraam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).