Re: [PATCH v2 1/2] repo: add a default output format to enum output_format
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jan 8, 2026, 06:13 UTC
- Message-ID
- <aV9LBNtCaMMTlc8l@pks.im>
- In-Reply-To
- <6D2CDFA6-FB52-4BFD-B800-B01B5E484038@gmail.com>
On Wed, Jan 07, 2026 at 06:28:59PM -0300, Lucas Seiki Oshiro wrote:
Show 16 quoted lines
> > > 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