Commit Diff


commit - 11490987f87a21739abbbaba45fa408258cb6581
commit + 5c24b9c1a40292f6b5b88d32a9945dd3440b2ed2
blob - c25e6cbfab838e0e2a592a5135b11fdd960fab93
blob + f70f4faf97c36aa65cabcb8d08afdc2c40d8516b
--- 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 - 81b177b04042f90b810ce232ee3ceb8b0c6766d9
blob + 181370be4b4b57a6312dd3f026ccfc0f8c2f2e65
--- tog/tog.c
+++ tog/tog.c
@@ -4725,8 +4725,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;