Subject: Re: [PATCH v2 1/2] repo: add a default output format to enum output_format

From: Patrick Steinhardt <[email-masked]>
Date: Thu, 8 Jan 2026 07:13:24 +0100

On Wed, Jan 07, 2026 at 06:28:59PM -0300, Lucas Seiki Oshiro wrote:
> 
> > This is missing a test.
> 
> Indeed, I'll add a test for `--format=default`.
> 
> > It would for example be nice to verify that
> > "--format=nul --format=default" does the expected thing.
> 
> Would it be necessary? We already have a test asserting that the
> last "--format" wins:
> 
> test_expect_success 'git repo info uses the last requested format' '
> 	echo "layout.bare=false" >expected &&
> 	git repo info --format=nul -z --format=keyvalue layout.bare >actual &&
> 	test_cmp expected actual
> '

Yup, but we don't have any test that verifies we do the right thing when
the user asks for the default format. So it's mostly an additional check
that the default format can be requested as expected, which would in the
normal case be a no-op as, well, it's the default. So if you specify a
different format before we verify that it can reset to the default.

Patrick