Use correct grammar in diffstat summary line
"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 <pclouds@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
828ea97de4
commit
7f814632f5
@ -1004,7 +1004,7 @@ Updating from ae3a2da... to a80b4aa....
|
||||
Fast-forward (no commit created; -m option ignored)
|
||||
example | 1 +
|
||||
hello | 1 +
|
||||
2 files changed, 2 insertions(+), 0 deletions(-)
|
||||
2 files changed, 2 insertions(+)
|
||||
----------------
|
||||
|
||||
Because your branch did not contain anything more than what had
|
||||
|
@ -34,12 +34,12 @@ $ echo 'hello world' > file.txt
|
||||
$ git add .
|
||||
$ git commit -a -m "initial commit"
|
||||
[master (root-commit) 54196cc] initial commit
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 file.txt
|
||||
$ echo 'hello world!' >file.txt
|
||||
$ git commit -a -m "add emphasis"
|
||||
[master c4d59f3] add emphasis
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
------------------------------------------------
|
||||
|
||||
What are the 7 digits of hex that git responded to the commit with?
|
||||
|
Reference in New Issue
Block a user