{"thread":{"id":"47454","subject":"'git format-patch <ref> --summary' seems to be turning off the stat","startedAt":"2017-12-16T18:57:40Z","lastAt":"2017-12-18T18:44:57Z","messageCount":3,"participants":["Kaartic Sivaraam","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"334940","messageId":"b620caf9-e11c-1511-67a6-d9f981f28728@gmail.com","threadId":"47454","inReplyTo":null,"subject":"'git format-patch <ref> --summary' seems to be turning off the stat","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2017-12-16T18:57:28Z","receivedAt":"2017-12-16T18:57:40Z","isPatch":false,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"The documentation for \"--summary\" option in the format-patch Doc states, \n--summary Output a condensed summary of extended header information such \nas creations, renames and mode changes. It doesn't state anything about \nturning of the stat. Why does the stat get turned off when \"--summary\" \noption is used along with \"git format-patch\" ? Note: I do see that \n\"--summary\" is a diff-option but does that mean we should't be printing \nstat information in the patch when the user didn't mention \"--no-stat\"? \nYeah, \"git format-patch <ref> --summary --stat\" does bring back the \nstat. --- Kaartic\n"},{"id":"334981","messageId":"xmqqlghzyj9q.fsf@gitster.mtv.corp.google.com","threadId":"47454","inReplyTo":"b620caf9-e11c-1511-67a6-d9f981f28728@gmail.com","subject":"Re: 'git format-patch <ref> --summary' seems to be turning off the stat","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-18T18:37:37Z","receivedAt":"2017-12-18T18:37:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:\n\n> Note: I do see that \"--summary\" is a diff-option but does that mean we\n> should't be printing stat information in the patch when the user\n> didn't mention \"--no-stat\"? Yeah, \"git format-patch <ref> --summary\n> --stat\" does bring back the stat. --- Kaartic\n\nThe old design decision shared across \"log\" family of commands [*1*]\nwrt to these \"how and what are shown\" options is that they started\nwithout any default set of options and the user gave all options (if\nthey want both summary and stat, they gave them from the command\nline); over time they gained a set of built-in default options that\ntake effect only when the user gives no option.\n\nSo, yes, giving \"--summary\" will turn off the built-in ones that are\n\"--summary --stat\" (IIRC).\n\n\n[Footnote]\n\n*1* \"show\" turns \"-p\" on by default, but with \"show --stat\" you can\n    get \"--stat\" without the patch.  That comes from the same design.\n"},{"id":"334983","messageId":"41f53071-185d-58a5-499c-d93208aa70fc@gmail.com","threadId":"47454","inReplyTo":"xmqqlghzyj9q.fsf@gitster.mtv.corp.google.com","subject":"Re: 'git format-patch <ref> --summary' seems to be turning off the stat","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2017-12-18T18:44:43Z","receivedAt":"2017-12-18T18:44:57Z","isPatch":false,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"On Tuesday 19 December 2017 12:07 AM, Junio C Hamano wrote:\n> Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:\n> \n>> Note: I do see that \"--summary\" is a diff-option but does that mean we\n>> should't be printing stat information in the patch when the user\n>> didn't mention \"--no-stat\"? Yeah, \"git format-patch <ref> --summary\n>> --stat\" does bring back the stat. --- Kaartic\n> \n> The old design decision shared across \"log\" family of commands [*1*]\n> wrt to these \"how and what are shown\" options is that they started\n> without any default set of options and the user gave all options (if\n> they want both summary and stat, they gave them from the command\n> line); over time they gained a set of built-in default options that\n> take effect only when the user gives no option.\n> \n> So, yes, giving \"--summary\" will turn off the built-in ones that are\n> \"--summary --stat\" (IIRC).\n>\n\nIs it worth documenting that built-in defaults are turned off when user \ngives other options? Not sure where, though?\n\n\n-- \nKaartic\n"}]}