Subject: Re: [RFC PATCH] config: teach `repo_config()` to allow `repo` to be NULL

From: Junio C Hamano <[email-masked]>
Date: Mon, 03 Mar 2025 10:24:00 -0800

Usman Akinyemi <[email-masked]> writes:

> On Sun, Mar 2, 2025 at 1:15 AM Junio C Hamano <[email-masked]> wrote:
>>
>> Usman Akinyemi <[email-masked]> writes:
>>
>> > Also, about the testing, I was thinking of using the clar framework or the
>> > test-tool, do you have any in mind ?
>>
>> Neither of them seems a good fit for the task to me.
>>
>> Once you rewrite one of the built-in commands using this and run
>> "git $cmd -h" under "nongit" helper, wouldn't that be a good enough
>> test to future-proof the codepath?
> Thanks for this.
>
> To confirm, You meant using the "nonigt" functions in test files
> inside the "t/" directory?

Sorry, but I do not quite understand the question.

What I meant was to peek at existing practice in

	$ git grep '	nongit ' 't/t[0-9][0-9][0-9][0-9]-*.sh'

for inspirations, like

t/t4203-mailmap.sh:	nongit git shortlog -s <input >actual &&

where a command pretends to be run "outside" a repository.