Re: [PATCH 2/1] merge/pull: extend merge.stat configuration variable to cover --compact-summary
On Wed, Jun 11, 2025 at 1:00 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Existing `merge.stat` configuration variable is a Boolean that
> defaults to `true` to control `git merge --[no-]stat` behaviour.
>
> Extend it to be "Boolean or text", that takes false, true, or
> "compact", with the last one triggering the --compact-summary
> option introduced earlier.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
> @@ -231,6 +231,21 @@ test_expect_success 'the same merge with compact summary' '
> +test_expect_success 'the same merge with merge.stat=compact' '
> + cat >expect <<-EOF &&
Do we want \EOF (with backslash)?
Show 12 quoted lines
> + Updating FROM..TO
> + Fast-forward
> + file | 2 +-
> + other (new) | 9 +++++++++
> + 2 files changed, 10 insertions(+), 1 deletion(-)
> + EOF
> +
> + git reset --hard c0 &&
> + git -c merge.stat=compact merge c1 >out &&
> + sed -e "1s/^Updating [0-9a-f.]*/Updating FROM..TO/" out >actual &&
> + test_cmp expect actual
> +'