git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 3, 2025, 18:24 UTC
Message-ID
<xmqq1pvevupr.fsf@gitster.g>
In-Reply-To
<CAPSxiM9x=3WTmH-NSuV7Z1FtXMJ6v5B0R-zB3DOKcyiLKXy2rg@mail.gmail.com>
Usman Akinyemi <usmanakinyemi202@gmail.com> writes:
Show 16 quoted lines
> On Sun, Mar 2, 2025 at 1:15 AM Junio C Hamano <gitster@pobox.com> wrote:
>>
>> Usman Akinyemi <usmanakinyemi202@gmail.com> 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.
Previous: Usman Akinyemi
Message 9 of 9 in “config: teach `repo_config()` to allow `repo` to be NULL”
  1. config: teach `repo_config()` to allow `repo` to be NULLUsman Akinyemi, Feb 27, 2025
  2. Eric SunshineFeb 27, 2025
  3. Junio C HamanoFeb 27, 2025
  4. Phillip WoodFeb 28, 2025
  5. Junio C HamanoFeb 28, 2025
  6. Usman AkinyemiFeb 28, 2025
  7. Junio C HamanoMar 1, 2025
  8. Usman AkinyemiMar 3, 2025
  9. Junio C HamanoMar 3, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.