From 7f814632f5d4d7af9f4225ece6039dbc44e03079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Wed, 1 Feb 2012 19:55:07 +0700 Subject: Use correct grammar in diffstat summary line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "git diff --stat" and "git apply --stat" now learn to print the line "%d files changed, %d insertions(+), %d deletions(-)" in singular form whenever applicable. "0 insertions" and "0 deletions" are also omitted unless they are both zero. This matches how versions of "diffstat" that are not prehistoric produced their output, and also makes this line translatable. [jc: with help from Thomas Dickey in archaeology of "diffstat"] [jc: squashed Jonathan's updates to illustrations in tutorials and a test] Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 't/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master') diff --git a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master index df0aaa9f2c..48b0d4b91d 100644 --- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master +++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master @@ -8,7 +8,7 @@ Date: Mon Jun 26 00:04:00 2006 +0000 dir/sub | 2 ++ file0 | 3 +++ - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) diff --cc dir/sub index cead32e,7289e35..992913c @@ -47,7 +47,7 @@ Date: Mon Jun 26 00:03:00 2006 +0000 dir/sub | 2 ++ file0 | 3 +++ file3 | 4 ++++ - 3 files changed, 9 insertions(+), 0 deletions(-) + 3 files changed, 9 insertions(+) create mode 100644 file3 diff --git a/dir/sub b/dir/sub @@ -89,7 +89,7 @@ Date: Mon Jun 26 00:02:00 2006 +0000 --- dir/sub | 2 ++ file1 | 3 +++ - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) create mode 100644 file1 diff --git a/dir/sub b/dir/sub @@ -165,7 +165,7 @@ Date: Mon Jun 26 00:00:00 2006 +0000 dir/sub | 2 ++ file0 | 3 +++ file2 | 3 +++ - 3 files changed, 8 insertions(+), 0 deletions(-) + 3 files changed, 8 insertions(+) create mode 100644 dir/sub create mode 100644 file0 create mode 100644 file2 -- cgit v1.2.3