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