diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-01-25 18:59:26 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-25 10:45:47 -0800 |
commit | 43662b23abbd8b86ce6a9c87c80900eab84d97d9 (patch) | |
tree | 344ee2cbeb72f1b496e49386368f290df63dab41 | |
parent | 5be1f00a9a701532232f57958efab4be8c959a29 (diff) | |
download | git-43662b23abbd8b86ce6a9c87c80900eab84d97d9.tar.gz |
format-patch: keep cover-letter diffstat wrapped in 72 columns
We already wrap shortlog around 72 columns in cover letters. Do the same
for diffstat (also in cover letters).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin/log.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c index 46b4ca13e5..96af897403 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -29,6 +29,8 @@ #include "gpg-interface.h" #include "progress.h" +#define MAIL_DEFAULT_WRAP 72 + /* Set a default date-time format for git log ("log.date" config variable) */ static const char *default_date_mode = NULL; @@ -1044,7 +1046,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout, shortlog_init(&log); log.wrap_lines = 1; - log.wrap = 72; + log.wrap = MAIL_DEFAULT_WRAP; log.in1 = 2; log.in2 = 4; log.file = rev->diffopt.file; @@ -1061,6 +1063,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout, memcpy(&opts, &rev->diffopt, sizeof(opts)); opts.output_format = DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT; + opts.stat_width = MAIL_DEFAULT_WRAP; diff_setup_done(&opts); |