commit 65dedee0a2cddb92e5184e594424e1d42420e8b0 from: Mark Jamsek date: Sun Jan 15 11:39:56 2023 UTC don't use plural noun after 1 in diffstat total Use singular form when appropriate; for example, turn the top into the bottom: 1 file changed, 1 insertions(+), 1 deletions(-) 1 file changed, 1 insertion(+), 1 deletion(-) ok op@ commit - d38823945b8782a695c7edc575f2e85a16b53d95 commit + 65dedee0a2cddb92e5184e594424e1d42420e8b0 blob - a20fdf567d2fb43a228a54708fee12c13f94796b blob + e432b18620ea668642106a045956a1a96bef04bc --- got/got.c +++ got/got.c @@ -4168,8 +4168,9 @@ print_diffstat(struct got_diffstat_cb_arg *dsa, struct printf(" %c %s%*c | %*d+ %*d-\n", cp->status, pe->path, pad, ' ', dsa->add_cols + 1, cp->add, dsa->rm_cols + 1, cp->rm); } - printf("\n%d file%s changed, %d insertions(+), %d deletions(-)\n\n", - dsa->nfiles, dsa->nfiles > 1 ? "s" : "", dsa->ins, dsa->del); + printf("\n%d file%s changed, %d insertion%s(+), %d deletion%s(-)\n\n", + dsa->nfiles, dsa->nfiles > 1 ? "s" : "", dsa->ins, + dsa->ins != 1 ? "s" : "", dsa->del, dsa->del != 1 ? "s" : ""); if (fflush(stdout) != 0) return got_error_from_errno("fflush"); blob - 3bf0246d75b75fc92ca14ca210759bab8aebcdc2 blob + 8766355007a2f2ff1724f384dc2bae3e21660b51 --- tog/tog.c +++ tog/tog.c @@ -4720,8 +4720,9 @@ write_commit_info(struct got_diff_line **lines, size_t goto done; n = fprintf(outfile, - "%d file%s changed, %d insertions(+), %d deletions(-)\n", - dsa.nfiles, dsa.nfiles > 1 ? "s" : "", dsa.ins, dsa.del); + "%d file%s changed, %d insertion%s(+), %d deletion%s(-)\n", + dsa.nfiles, dsa.nfiles > 1 ? "s" : "", dsa.ins, + dsa.ins != 1 ? "s" : "", dsa.del, dsa.del != 1 ? "s" : ""); if (n < 0) { err = got_error_from_errno("fprintf"); goto done;