From: Eric Sunshine Date: Wed, 11 Jun 2025 17:12:20 GMT Subject: Re: [PATCH 2/1] merge/pull: extend merge.stat configuration variable to cover --compact-summary Message-ID: In-Reply-To: On Wed, Jun 11, 2025 at 1:00 PM Junio C Hamano wrote: > 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 > --- > 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)? > + 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 > +'