git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] format-patch: set default stat_width to 72
@ 2008-04-03 10:22 Jeff King
  2008-04-04  6:12 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2008-04-03 10:22 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Jan Engelhardt

The usual default is 80, which should fit in the terminals
of most users. However, it is usually considered polite to
keep email lines to 72 characters to accomodate a few layers
of quoting.

Signed-off-by: Jeff King <peff@peff.net>
---
On Thu, Apr 03, 2008 at 06:14:18AM -0400, Jeff King wrote:

> format-patch already defaults to "--stat --summary -p" if you give it
> no format options. The default stat is 80, I believe; for format-patch
> it should probably be bumped to 72 anyway.

This should be totally harmless and maint-worthy, I would think.

 builtin-log.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index 5c00725..8d7b975 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -771,6 +771,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
 	rev.ignore_merges = 1;
 	rev.diffopt.msg_sep = "";
 	DIFF_OPT_SET(&rev.diffopt, RECURSIVE);
+	rev.diffopt.stat_width = 72;
 
 	rev.subject_prefix = fmt_patch_subject_prefix;
 
-- 
1.5.5.rc2.171.g7962.dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] format-patch: set default stat_width to 72
  2008-04-03 10:22 [PATCH] format-patch: set default stat_width to 72 Jeff King
@ 2008-04-04  6:12 ` Junio C Hamano
  2008-04-04 10:50   ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2008-04-04  6:12 UTC (permalink / raw)
  To: Jeff King; +Cc: git, Jan Engelhardt

Jeff King <peff@peff.net> writes:

>> format-patch already defaults to "--stat --summary -p" if you give it
>> no format options. The default stat is 80, I believe; for format-patch
>> it should probably be bumped to 72 anyway.

> This should be totally harmless and maint-worthy, I would think.

Harmless it might be, in the sense that it won't eat your data.

But it loses information, and I am not sure if it is worth it.  Why do you
even worry about "a few layers of quoting"?  Isn't it a much worse offense
from responder/commenter's part to quote and NOT trimming diffstat part?

 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] format-patch: set default stat_width to 72
  2008-04-04  6:12 ` Junio C Hamano
@ 2008-04-04 10:50   ` Jeff King
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff King @ 2008-04-04 10:50 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Jan Engelhardt

On Thu, Apr 03, 2008 at 11:12:23PM -0700, Junio C Hamano wrote:

> >> format-patch already defaults to "--stat --summary -p" if you give it
> >> no format options. The default stat is 80, I believe; for format-patch
> >> it should probably be bumped to 72 anyway.
> [...]
> But it loses information, and I am not sure if it is worth it.  Why do you
> even worry about "a few layers of quoting"?  Isn't it a much worse offense
> from responder/commenter's part to quote and NOT trimming diffstat part?

I don't think a blanket rule to say "it is wrong for a responder to
quote the diffstat part" makes sense. I have several times seen people
specifically responding to the diffstat.

At any rate, I don't think the current setting is a big problem; my
thought was that we are generating an email, and that certain line
length conventions tend to apply there (though it could just as easily
be 76, or 78, or whatever convention). Losing a few characters off the
end of the diffstat doesn't really seem like information loss to me
(the +++-- part is gets chomped, and it is already being chomped for the
80-character limit; we just normalize it to a slightly smaller number of
characters).

But I don't really care that much, so please drop the patch if you are
concerned about that.

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-04 10:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-03 10:22 [PATCH] format-patch: set default stat_width to 72 Jeff King
2008-04-04  6:12 ` Junio C Hamano
2008-04-04 10:50   ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).