{"thread":{"id":"12971","subject":"[PATCH] format-patch: set default stat_width to 72","startedAt":"2008-04-03T10:22:14Z","lastAt":"2008-04-04T10:50:56Z","messageCount":3,"participants":["Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"73593","messageId":"20080403102214.GA23121@coredump.intra.peff.net","threadId":"12971","inReplyTo":null,"subject":"[PATCH] format-patch: set default stat_width to 72","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-04-03T10:22:14Z","receivedAt":"2008-04-03T10:22:14Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The usual default is 80, which should fit in the terminals\nof most users. However, it is usually considered polite to\nkeep email lines to 72 characters to accomodate a few layers\nof quoting.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nOn Thu, Apr 03, 2008 at 06:14:18AM -0400, Jeff King wrote:\n\n> format-patch already defaults to \"--stat --summary -p\" if you give it\n> no format options. The default stat is 80, I believe; for format-patch\n> it should probably be bumped to 72 anyway.\n\nThis should be totally harmless and maint-worthy, I would think.\n\n builtin-log.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 5c00725..8d7b975 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -771,6 +771,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \trev.ignore_merges = 1;\n \trev.diffopt.msg_sep = \"\";\n \tDIFF_OPT_SET(&rev.diffopt, RECURSIVE);\n+\trev.diffopt.stat_width = 72;\n \n \trev.subject_prefix = fmt_patch_subject_prefix;\n \n-- \n1.5.5.rc2.171.g7962.dirty\n"},{"id":"73643","messageId":"7vr6dmywqg.fsf@gitster.siamese.dyndns.org","threadId":"12971","inReplyTo":"20080403102214.GA23121@coredump.intra.peff.net","subject":"Re: [PATCH] format-patch: set default stat_width to 72","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-04T06:12:23Z","receivedAt":"2008-04-04T06:12:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>> format-patch already defaults to \"--stat --summary -p\" if you give it\n>> no format options. The default stat is 80, I believe; for format-patch\n>> it should probably be bumped to 72 anyway.\n\n> This should be totally harmless and maint-worthy, I would think.\n\nHarmless it might be, in the sense that it won't eat your data.\n\nBut it loses information, and I am not sure if it is worth it.  Why do you\neven worry about \"a few layers of quoting\"?  Isn't it a much worse offense\nfrom responder/commenter's part to quote and NOT trimming diffstat part?\n\n \n"},{"id":"73648","messageId":"20080404105056.GB29672@sigill.intra.peff.net","threadId":"12971","inReplyTo":"7vr6dmywqg.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] format-patch: set default stat_width to 72","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-04-04T10:50:56Z","receivedAt":"2008-04-04T10:50:56Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 03, 2008 at 11:12:23PM -0700, Junio C Hamano wrote:\n\n> >> format-patch already defaults to \"--stat --summary -p\" if you give it\n> >> no format options. The default stat is 80, I believe; for format-patch\n> >> it should probably be bumped to 72 anyway.\n> [...]\n> But it loses information, and I am not sure if it is worth it.  Why do you\n> even worry about \"a few layers of quoting\"?  Isn't it a much worse offense\n> from responder/commenter's part to quote and NOT trimming diffstat part?\n\nI don't think a blanket rule to say \"it is wrong for a responder to\nquote the diffstat part\" makes sense. I have several times seen people\nspecifically responding to the diffstat.\n\nAt any rate, I don't think the current setting is a big problem; my\nthought was that we are generating an email, and that certain line\nlength conventions tend to apply there (though it could just as easily\nbe 76, or 78, or whatever convention). Losing a few characters off the\nend of the diffstat doesn't really seem like information loss to me\n(the +++-- part is gets chomped, and it is already being chomped for the\n80-character limit; we just normalize it to a slightly smaller number of\ncharacters).\n\nBut I don't really care that much, so please drop the patch if you are\nconcerned about that.\n\n-Peff\n"}]}