Download raw body.
diffstat output tweak
On 2023/01/15 21:46:45 +1100, Mark Jamsek <mark@jamsek.com> wrote:
> I noticed git diffstat only pluralises {dele,inser}tion(s) when more
> than 1 change occurs. And, relatedly, when there aren't any
> {dele,inser}tions, that substring is elided altogether.
>
> For an example of the latter, see this diff[0] to tech@ where there were
> no deletions and observe how that part of the summary is absent:
>
> ----8<--------
> regress/lib/libz/Makefile | 15 +++++++++++++++
> regress/lib/libz/utils_unittest.cc | 3 +++
> 2 files changed, 18 insertions(+)
> -------->8----
>
> For an example of the former, see this diff[1] to tech@ where the total
> change was just 1 insertion and 1 deletion:
>
> ----8<--------
> ssh.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> -------->8----
>
> I agree with the second example (i.e., don't use a plural noun after 1),
> but I don't particularly like the idea of eliding a summary total
> altogether, and prefer we continue displaying "0 {dele,inser}tions".
> On that note, I think 0 should keep the plural form (e.g., 0 insertions,
> not 0 insertion).
>
> In short, the below diff changes the top into the bottom:
>
> 1 file changed, 1 insertions(+), 1 deletions(-)
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> ok?
I don't have a strong opinion in showing or eliding the "0 deletions"
(or insertions), but I tend to agree with you in not hinding the
information.
anyway, ok for the pluralization
diffstat output tweak