* [PATCH v2 1/2] format-patch: keep cover-letter diffstat wrapped in 72 columns
2018-01-25 11:59 ` [PATCH v2 0/2] wrap format-patch diffstats around 72 columns Nguyễn Thái Ngọc Duy
@ 2018-01-25 11:59 ` Nguyễn Thái Ngọc Duy
2018-01-25 11:59 ` [PATCH v2 2/2] format-patch: reduce patch diffstat width to 72 Nguyễn Thái Ngọc Duy
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2018-01-25 11:59 UTC (permalink / raw)
To: git
Cc: Jeff King, Ævar Arnfjörð Bjarmason, Junio C Hamano,
Nguyễn Thái Ngọc Duy
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>
---
builtin/log.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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);
--
2.16.1.200.g71ee9f6994
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 2/2] format-patch: reduce patch diffstat width to 72
2018-01-25 11:59 ` [PATCH v2 0/2] wrap format-patch diffstats around 72 columns Nguyễn Thái Ngọc Duy
2018-01-25 11:59 ` [PATCH v2 1/2] format-patch: keep cover-letter diffstat wrapped in " Nguyễn Thái Ngọc Duy
@ 2018-01-25 11:59 ` Nguyễn Thái Ngọc Duy
2018-01-27 16:47 ` Jeff King
2018-01-27 16:48 ` [PATCH v2 0/2] wrap format-patch diffstats around 72 columns Jeff King
2018-02-01 12:47 ` [PATCH v3 " Nguyễn Thái Ngọc Duy
3 siblings, 1 reply; 17+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2018-01-25 11:59 UTC (permalink / raw)
To: git
Cc: Jeff King, Ævar Arnfjörð Bjarmason, Junio C Hamano,
Nguyễn Thái Ngọc Duy
Patches generated by format-patch are meant to be exchanged as emails,
most of the time. And since it's generally agreed that text in mails
should be wrapped around 70 columns or so, make sure these diffstat
follow the convention (especially when used with --cover-letter since we
already defaults to wrapping 72 columns). The default can still be
overriden with command line options.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
builtin/log.c | 2 ++
t/t4052-stat-output.sh | 28 ++++++++++++++--------------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index 96af897403..94ee177d56 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1617,6 +1617,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
(!rev.diffopt.output_format ||
rev.diffopt.output_format == DIFF_FORMAT_PATCH))
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_SUMMARY;
+ if (!rev.diffopt.stat_width)
+ rev.diffopt.stat_width = MAIL_DEFAULT_WRAP;
/* Always generate a patch */
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index 9f563db20a..1e62333b46 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -60,7 +60,7 @@ do
test_cmp expect actual
'
done <<\EOF
-format-patch -1 --stdout
+format-patch --stat=80 -1 --stdout
diff HEAD^ HEAD --stat
show --stat
log -1 --stat
@@ -79,11 +79,11 @@ test_expect_success 'preparation for big change tests' '
git commit -m message abcd
'
-cat >expect80 <<'EOF'
- abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+cat >expect72 <<'EOF'
+ abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
-cat >expect80-graph <<'EOF'
-| abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+cat >expect72-graph <<'EOF'
+| abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
cat >expect200 <<'EOF'
abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -107,7 +107,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect200 diff HEAD^ HEAD --stat
respects expect200 show --stat
respects expect200 log -1 --stat
@@ -135,7 +135,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect40 diff HEAD^ HEAD --stat
respects expect40 show --stat
respects expect40 log -1 --stat
@@ -163,7 +163,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect40 diff HEAD^ HEAD --stat
respects expect40 show --stat
respects expect40 log -1 --stat
@@ -250,11 +250,11 @@ show --stat
log -1 --stat
EOF
-cat >expect80 <<'EOF'
- ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++++++++++
+cat >expect72 <<'EOF'
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++
EOF
-cat >expect80-graph <<'EOF'
-| ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++++++++++
+cat >expect72-graph <<'EOF'
+| ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++
EOF
cat >expect200 <<'EOF'
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -278,7 +278,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect200 diff HEAD^ HEAD --stat
respects expect200 show --stat
respects expect200 log -1 --stat
@@ -308,7 +308,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect1 diff HEAD^ HEAD --stat
respects expect1 show --stat
respects expect1 log -1 --stat
--
2.16.1.200.g71ee9f6994
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/2] format-patch: reduce patch diffstat width to 72
2018-01-25 11:59 ` [PATCH v2 2/2] format-patch: reduce patch diffstat width to 72 Nguyễn Thái Ngọc Duy
@ 2018-01-27 16:47 ` Jeff King
2018-01-30 10:22 ` Duy Nguyen
0 siblings, 1 reply; 17+ messages in thread
From: Jeff King @ 2018-01-27 16:47 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy
Cc: git, Ævar Arnfjörð Bjarmason, Junio C Hamano
On Thu, Jan 25, 2018 at 06:59:27PM +0700, Nguyễn Thái Ngọc Duy wrote:
> diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
> index 9f563db20a..1e62333b46 100755
> --- a/t/t4052-stat-output.sh
> +++ b/t/t4052-stat-output.sh
> @@ -60,7 +60,7 @@ do
> test_cmp expect actual
> '
> done <<\EOF
> -format-patch -1 --stdout
> +format-patch --stat=80 -1 --stdout
> diff HEAD^ HEAD --stat
> show --stat
> log -1 --stat
This hunk confused me. I think what is going on is this:
- we have a loop that runs the same test on several commands
- that loop expects format-patch, diff, etc, to have the same output
- now that format-patch differs from the other commands in its default
length, we need to use a manual --stat-width to get identical output
It seems like that kind of nullifies the point of some of the tests in
the loop, though, since they are meant to check the behavior without
--stat.
OTOH, I think that case is tested later (in the other tests you
adjusted). So I guess these tests are just covering the "name vs bar
length" part?
-Peff
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/2] format-patch: reduce patch diffstat width to 72
2018-01-27 16:47 ` Jeff King
@ 2018-01-30 10:22 ` Duy Nguyen
0 siblings, 0 replies; 17+ messages in thread
From: Duy Nguyen @ 2018-01-30 10:22 UTC (permalink / raw)
To: Jeff King
Cc: Git Mailing List, Ævar Arnfjörð Bjarmason,
Junio C Hamano
On Sat, Jan 27, 2018 at 11:47 PM, Jeff King <peff@peff.net> wrote:
> On Thu, Jan 25, 2018 at 06:59:27PM +0700, Nguyễn Thái Ngọc Duy wrote:
>
>> diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
>> index 9f563db20a..1e62333b46 100755
>> --- a/t/t4052-stat-output.sh
>> +++ b/t/t4052-stat-output.sh
>> @@ -60,7 +60,7 @@ do
>> test_cmp expect actual
>> '
>> done <<\EOF
>> -format-patch -1 --stdout
>> +format-patch --stat=80 -1 --stdout
>> diff HEAD^ HEAD --stat
>> show --stat
>> log -1 --stat
>
> This hunk confused me. I think what is going on is this:
>
> - we have a loop that runs the same test on several commands
>
> - that loop expects format-patch, diff, etc, to have the same output
>
> - now that format-patch differs from the other commands in its default
> length, we need to use a manual --stat-width to get identical output
>
> It seems like that kind of nullifies the point of some of the tests in
> the loop, though, since they are meant to check the behavior without
> --stat.
>
> OTOH, I think that case is tested later (in the other tests you
> adjusted). So I guess these tests are just covering the "name vs bar
> length" part?
My bad. My thought was.. "Hmm.. I would need to take format-patch out
out the loop since it won't match exactly 80 columns anymore. That's a
lot of work. Hey how about using this opportunity to test that --stat=
can still override default settings?" I didn't realize the follow
tests in that loop set stat width. I'll take format-patch out of the
loop and deal with it separately.
--
Duy
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/2] wrap format-patch diffstats around 72 columns
2018-01-25 11:59 ` [PATCH v2 0/2] wrap format-patch diffstats around 72 columns Nguyễn Thái Ngọc Duy
2018-01-25 11:59 ` [PATCH v2 1/2] format-patch: keep cover-letter diffstat wrapped in " Nguyễn Thái Ngọc Duy
2018-01-25 11:59 ` [PATCH v2 2/2] format-patch: reduce patch diffstat width to 72 Nguyễn Thái Ngọc Duy
@ 2018-01-27 16:48 ` Jeff King
2018-02-01 12:47 ` [PATCH v3 " Nguyễn Thái Ngọc Duy
3 siblings, 0 replies; 17+ messages in thread
From: Jeff King @ 2018-01-27 16:48 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy
Cc: git, Ævar Arnfjörð Bjarmason, Junio C Hamano
On Thu, Jan 25, 2018 at 06:59:25PM +0700, Nguyễn Thái Ngọc Duy wrote:
> Like v1, these changes keep diffstat generated by format-patch in 72
> columns. This constant is already used in the code, so it's a bit
> better than my random "70 or 75" value.
>
> Granted these hard coded values (both 80 and 72) are not really nice.
> But I would wait for somebody to say "I need or want this" before I
> add code to make the default configurable.
>
> Nguyễn Thái Ngọc Duy (2):
> format-patch: keep cover-letter diffstat wrapped in 72 columns
> format-patch: reduce patch diffstat width to 72
This looks OK to me. There was one head-scratcher in the second patch
which I mentioned, but I think it's probably OK.
I also notice that we have no tests for diffstat on a cover letter,
which might be worth addressing.
-Peff
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v3 0/2] wrap format-patch diffstats around 72 columns
2018-01-25 11:59 ` [PATCH v2 0/2] wrap format-patch diffstats around 72 columns Nguyễn Thái Ngọc Duy
` (2 preceding siblings ...)
2018-01-27 16:48 ` [PATCH v2 0/2] wrap format-patch diffstats around 72 columns Jeff King
@ 2018-02-01 12:47 ` Nguyễn Thái Ngọc Duy
2018-02-01 12:47 ` [PATCH v3 1/2] format-patch: keep cover-letter diffstat wrapped in " Nguyễn Thái Ngọc Duy
` (2 more replies)
3 siblings, 3 replies; 17+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2018-02-01 12:47 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Jeff King, Ævar Arnfjörð Bjarmason,
Nguyễn Thái Ngọc Duy
v3 fixes tests in 2/2 that I overlooked (but Jeff didn't). Interdiff:
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index 1e62333b46..6e2cf933f7 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -19,17 +19,33 @@ test_expect_success 'preparation' '
git commit -m message "$name"
'
+cat >expect72 <<-'EOF'
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
+EOF
+test_expect_success "format-patch: small change with long name gives more space to the name" '
+ git format-patch -1 --stdout >output &&
+ grep " | " output >actual &&
+ test_cmp expect72 actual
+'
+
while read cmd args
do
- cat >expect <<-'EOF'
+ cat >expect80 <<-'EOF'
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
EOF
test_expect_success "$cmd: small change with long name gives more space to the name" '
git $cmd $args >output &&
grep " | " output >actual &&
- test_cmp expect actual
+ test_cmp expect80 actual
'
+done <<\EOF
+diff HEAD^ HEAD --stat
+show --stat
+log -1 --stat
+EOF
+while read cmd args
+do
cat >expect <<-'EOF'
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
EOF
@@ -60,7 +76,7 @@ do
test_cmp expect actual
'
done <<\EOF
-format-patch --stat=80 -1 --stdout
+format-patch -1 --stdout
diff HEAD^ HEAD --stat
show --stat
log -1 --stat
Nguyễn Thái Ngọc Duy (2):
format-patch: keep cover-letter diffstat wrapped in 72 columns
format-patch: reduce patch diffstat width to 72
builtin/log.c | 7 ++++++-
t/t4052-stat-output.sh | 46 ++++++++++++++++++++++++++++--------------
2 files changed, 37 insertions(+), 16 deletions(-)
--
2.16.1.205.g271f633410
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 1/2] format-patch: keep cover-letter diffstat wrapped in 72 columns
2018-02-01 12:47 ` [PATCH v3 " Nguyễn Thái Ngọc Duy
@ 2018-02-01 12:47 ` Nguyễn Thái Ngọc Duy
2018-02-01 12:47 ` [PATCH v3 2/2] format-patch: reduce patch diffstat width to 72 Nguyễn Thái Ngọc Duy
2018-02-02 18:42 ` [PATCH v3 0/2] wrap format-patch diffstats around 72 columns Junio C Hamano
2 siblings, 0 replies; 17+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2018-02-01 12:47 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Jeff King, Ævar Arnfjörð Bjarmason,
Nguyễn Thái Ngọc Duy
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>
---
builtin/log.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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);
--
2.16.1.205.g271f633410
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 2/2] format-patch: reduce patch diffstat width to 72
2018-02-01 12:47 ` [PATCH v3 " Nguyễn Thái Ngọc Duy
2018-02-01 12:47 ` [PATCH v3 1/2] format-patch: keep cover-letter diffstat wrapped in " Nguyễn Thái Ngọc Duy
@ 2018-02-01 12:47 ` Nguyễn Thái Ngọc Duy
2018-02-02 18:42 ` [PATCH v3 0/2] wrap format-patch diffstats around 72 columns Junio C Hamano
2 siblings, 0 replies; 17+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2018-02-01 12:47 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Jeff King, Ævar Arnfjörð Bjarmason,
Nguyễn Thái Ngọc Duy
Patches generated by format-patch are meant to be exchanged as emails,
most of the time. And since it's generally agreed that text in mails
should be wrapped around 70 columns or so, make sure these diffstat
follow the convention (especially when used with --cover-letter since we
already defaults to wrapping 72 columns). The default can still be
overriden with command line options.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
builtin/log.c | 2 ++
t/t4052-stat-output.sh | 46 ++++++++++++++++++++++++++++--------------
2 files changed, 33 insertions(+), 15 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index 96af897403..94ee177d56 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1617,6 +1617,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
(!rev.diffopt.output_format ||
rev.diffopt.output_format == DIFF_FORMAT_PATCH))
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_SUMMARY;
+ if (!rev.diffopt.stat_width)
+ rev.diffopt.stat_width = MAIL_DEFAULT_WRAP;
/* Always generate a patch */
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index 9f563db20a..6e2cf933f7 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -19,17 +19,33 @@ test_expect_success 'preparation' '
git commit -m message "$name"
'
+cat >expect72 <<-'EOF'
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
+EOF
+test_expect_success "format-patch: small change with long name gives more space to the name" '
+ git format-patch -1 --stdout >output &&
+ grep " | " output >actual &&
+ test_cmp expect72 actual
+'
+
while read cmd args
do
- cat >expect <<-'EOF'
+ cat >expect80 <<-'EOF'
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
EOF
test_expect_success "$cmd: small change with long name gives more space to the name" '
git $cmd $args >output &&
grep " | " output >actual &&
- test_cmp expect actual
+ test_cmp expect80 actual
'
+done <<\EOF
+diff HEAD^ HEAD --stat
+show --stat
+log -1 --stat
+EOF
+while read cmd args
+do
cat >expect <<-'EOF'
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
EOF
@@ -79,11 +95,11 @@ test_expect_success 'preparation for big change tests' '
git commit -m message abcd
'
-cat >expect80 <<'EOF'
- abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+cat >expect72 <<'EOF'
+ abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
-cat >expect80-graph <<'EOF'
-| abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+cat >expect72-graph <<'EOF'
+| abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
cat >expect200 <<'EOF'
abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -107,7 +123,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect200 diff HEAD^ HEAD --stat
respects expect200 show --stat
respects expect200 log -1 --stat
@@ -135,7 +151,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect40 diff HEAD^ HEAD --stat
respects expect40 show --stat
respects expect40 log -1 --stat
@@ -163,7 +179,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect40 diff HEAD^ HEAD --stat
respects expect40 show --stat
respects expect40 log -1 --stat
@@ -250,11 +266,11 @@ show --stat
log -1 --stat
EOF
-cat >expect80 <<'EOF'
- ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++++++++++
+cat >expect72 <<'EOF'
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++
EOF
-cat >expect80-graph <<'EOF'
-| ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++++++++++
+cat >expect72-graph <<'EOF'
+| ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++
EOF
cat >expect200 <<'EOF'
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -278,7 +294,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect200 diff HEAD^ HEAD --stat
respects expect200 show --stat
respects expect200 log -1 --stat
@@ -308,7 +324,7 @@ do
test_cmp "$expect-graph" actual
'
done <<\EOF
-ignores expect80 format-patch -1 --stdout
+ignores expect72 format-patch -1 --stdout
respects expect1 diff HEAD^ HEAD --stat
respects expect1 show --stat
respects expect1 log -1 --stat
--
2.16.1.205.g271f633410
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v3 0/2] wrap format-patch diffstats around 72 columns
2018-02-01 12:47 ` [PATCH v3 " Nguyễn Thái Ngọc Duy
2018-02-01 12:47 ` [PATCH v3 1/2] format-patch: keep cover-letter diffstat wrapped in " Nguyễn Thái Ngọc Duy
2018-02-01 12:47 ` [PATCH v3 2/2] format-patch: reduce patch diffstat width to 72 Nguyễn Thái Ngọc Duy
@ 2018-02-02 18:42 ` Junio C Hamano
2 siblings, 0 replies; 17+ messages in thread
From: Junio C Hamano @ 2018-02-02 18:42 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy
Cc: git, Jeff King, Ævar Arnfjörð Bjarmason
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> v3 fixes tests in 2/2 that I overlooked (but Jeff didn't). Interdiff:
> ...
> Nguyễn Thái Ngọc Duy (2):
> format-patch: keep cover-letter diffstat wrapped in 72 columns
> format-patch: reduce patch diffstat width to 72
Thanks, will replace. I think we are pretty in good shape with
this change now.
^ permalink raw reply [flat|nested] 17+ messages in thread