Subject: Re: [PATCH v2] diff: add --compact-summary option to complement --stat

From: Junio C Hamano <[email-masked]>
Date: Fri, 19 Jan 2018 13:20:41 -0800

Nguyễn Thái Ngọc Duy  <[email-masked]> writes:

>      Documentation/merge-config.txt     |  4 +
>      builtin/merge.c                    |  2 +
>    A t/t5573-pull-verify-signatures.sh  | 81 ++++++++++++++++++
>      t/t7612-merge-verify-signatures.sh | 45 ++++++++++
>    4 files changed, 132 insertions(+)
> ...
> With this tweak, the actual printout is like this
>
>      Documentation/merge-config.txt     |  4 ++
>      builtin/merge.c                    |  2 +
>  A+x t/t5573-pull-verify-signatures.sh  | 81 ++++++++++++++++++++++++
>      t/t7612-merge-verify-signatures.sh | 45 +++++++++++++
>  4 files changed, 132 insertions(+)

I like the concept but given that additions and mode changes are
rare events, I am not so sure if it is worth always wasting three
columns like the above.  Assuming that this is solely meant for
human consumption and machine parsability is of no concern, I
actually prefer the output format you said you've been using your
personal fork, e.g.

 Documentation/merge-config.txt              |  4 ++
 builtin/merge.c                             |  2 +
 t/t5573-pull-verify-signatures.sh (new, +x) | 81 ++++++++++++++++++++++++
 t/t7612-merge-verify-signatures.sh          | 45 +++++++++++++

That is

 (1) do not change the starting column at the leftmost end, and
 (2) do not permanently allocate the columns for "compact" summary.

Instead, the above may be (a) just stealing the columns needed for
"(new, +x)" from the pathname portion of the output, and/or (2)
widening the pathname portion of the output for the whole thing
while doing so.