{"thread":{"id":"27973","subject":"[PATCH] Fixed pluralization in diff reports","startedAt":"2011-08-01T04:00:57Z","lastAt":"2011-08-01T05:09:23Z","messageCount":5,"participants":["Jon Forrest","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"172497","messageId":"4E3624F9.7070406@gmail.com","threadId":"27973","inReplyTo":null,"subject":"[PATCH] Fixed pluralization in diff reports","fromName":"Jon Forrest","fromEmail":"nobozo@gmail.com","sentAt":"2011-08-01T04:00:57Z","receivedAt":"2011-08-01T04:00:57Z","isPatch":true,"sender":{"key":"nobozo@gmail.com","avatar":"https://gravatar.com/avatar/37c6a7b57f29b3f35c6a9016537907c52f15bbf98575617dc046bcec6bf06372?d=mp&s=160"},"body":"I got irritated by the\n\n\t 1 files changed, 0 insertions(+), 1 deletions(-)\n\nlack of pluralization so I fixed it. Now it says\n\n\t 1 file changed, 0 insertions(+), 1 deletion(-)\n\nand so forth.\n\nSigned-off-by: Jon Forrest <nobozo@gmail.com>\n---\n  diff.c |   10 ++++++----\n  1 file changed, 6 insertions(+), 4 deletion(-)\n\ndiff --git a/diff.c b/diff.c\nindex 93ef9a2..a179b24 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1465,8 +1465,9 @@ static void show_stats(struct diffstat_t *data, \nstruct diff_options *options)\n  \t}\n  \tfprintf(options->file, \"%s\", line_prefix);\n  \tfprintf(options->file,\n-\t       \" %d files changed, %d insertions(+), %d deletions(-)\\n\",\n-\t       total_files, adds, dels);\n+\t       \" %d file%s changed, %d insertion%s(+), %d deletion%s(-)\\n\",\n+\t       total_files, total_files == 1 ? \"\" : \"s\", adds, adds == 1 ? \"\" \n: \"s\", dels,\n+\t\tdels == 1 ? \"\" : \"s\");\n  }\n\n  static void show_shortstats(struct diffstat_t *data, struct \ndiff_options *options)\n@@ -1496,8 +1497,9 @@ static void show_shortstats(struct diffstat_t \n*data, struct diff_options *option\n  \t\t\t\toptions->output_prefix_data);\n  \t\tfprintf(options->file, \"%s\", msg->buf);\n  \t}\n-\tfprintf(options->file, \" %d files changed, %d insertions(+), %d \ndeletions(-)\\n\",\n-\t       total_files, adds, dels);\n+\tfprintf(options->file, \" %d file%s changed, %d insertion%s(+), %d \ndeletion%s(-)\\n\",\n+\t       total_files, total_files == 1 ? \"\" : \"s\", adds, adds == 1 ? \"\" \n: \"s\", dels,\n+\t\tdels == 1 ? \"\" : \"s\");\n  }\n\n  static void show_numstat(struct diffstat_t *data, struct diff_options \n*options)\n-- 1.7.6.347.g4db0d.dirty\n"},{"id":"172498","messageId":"7v8vrdkc19.fsf@alter.siamese.dyndns.org","threadId":"27973","inReplyTo":"4E3624F9.7070406@gmail.com","subject":"Re: [PATCH] Fixed pluralization in diff reports","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-08-01T04:09:54Z","receivedAt":"2011-08-01T04:09:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jon Forrest <nobozo@gmail.com> writes:\n\n> I got irritated by the\n>\n> \t 1 files changed, 0 insertions(+), 1 deletions(-)\n\nThis is how the other diff implementation has always showed this line, no?\n"},{"id":"172499","messageId":"4E36277B.9020208@gmail.com","threadId":"27973","inReplyTo":"7v8vrdkc19.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Fixed pluralization in diff reports","fromName":"Jon Forrest","fromEmail":"nobozo@gmail.com","sentAt":"2011-08-01T04:11:39Z","receivedAt":"2011-08-01T04:11:39Z","isPatch":true,"sender":{"key":"nobozo@gmail.com","avatar":"https://gravatar.com/avatar/37c6a7b57f29b3f35c6a9016537907c52f15bbf98575617dc046bcec6bf06372?d=mp&s=160"},"body":"On 7/31/2011 9:09 PM, Junio C Hamano wrote:\n> Jon Forrest<nobozo@gmail.com>  writes:\n>\n>> I got irritated by the\n>>\n>> \t 1 files changed, 0 insertions(+), 1 deletions(-)\n>\n> This is how the other diff implementation has always showed this line, no?\n\nMaybe, but it's not grammatical English no matter who does it.\n\nBut, I'm in the process of asking you to disregard this change\nbecause I noticed that the diff of my change to diff.c was\n\n\t1 file changed, 6 insertions(+), 4 deletion(-)\n\nThe last part is clearly wrong, but I don't see why\nmy change didn't work. It's such a simple change.\n\nBack to the drawing board.\n\nSorry for the bother.\n\nJon\n"},{"id":"172510","messageId":"7v4o21k9e9.fsf@alter.siamese.dyndns.org","threadId":"27973","inReplyTo":"4E36277B.9020208@gmail.com","subject":"Re: [PATCH] Fixed pluralization in diff reports","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-08-01T05:06:54Z","receivedAt":"2011-08-01T05:06:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jon Forrest <nobozo@gmail.com> writes:\n\n>> This is how the other diff implementation has always showed this line, no?\n>\n> Maybe, but it's not grammatical English no matter who does it.\n\nIt does not matter it is grammatical or not; changing it would break\nexpectation by scripts that are used to the output both by the other\nimplementation and by us.\n"},{"id":"172511","messageId":"4E363503.6050102@gmail.com","threadId":"27973","inReplyTo":"7v4o21k9e9.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Fixed pluralization in diff reports","fromName":"Jon Forrest","fromEmail":"nobozo@gmail.com","sentAt":"2011-08-01T05:09:23Z","receivedAt":"2011-08-01T05:09:23Z","isPatch":true,"sender":{"key":"nobozo@gmail.com","avatar":"https://gravatar.com/avatar/37c6a7b57f29b3f35c6a9016537907c52f15bbf98575617dc046bcec6bf06372?d=mp&s=160"},"body":"On 7/31/2011 10:06 PM, Junio C Hamano wrote:\n> Jon Forrest<nobozo@gmail.com>  writes:\n>\n>>> This is how the other diff implementation has always showed this line, no?\n>>\n>> Maybe, but it's not grammatical English no matter who does it.\n>\n> It does not matter it is grammatical or not; changing it would break\n> expectation by scripts that are used to the output both by the other\n> implementation and by us.\n\nI see your point. I agree that this change isn't important\nenough to disturb so many things. I didn't realize this\nwould happen.\n\nSorry,\nJon\n"}]}