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

Re: [PATCH v2] builtin/mktree: remove USE_THE_REPOSITORY_VARIABLE

From
Tian Yuchen <cat@malon.dev>
Date
Mar 12, 2026, 18:49 UTC
Message-ID
<2c9861c0-fdac-4123-8cd9-4a841755abf3@malon.dev>
In-Reply-To
<xmqqsea5ezwl.fsf@gitster.g>
Hi Junio,
Show 7 quoted lines
> RUN_SETUP also guarantees that the repo points at the_repository.
> 
> The patch is not wrong per-se, but at the same time, it is not a
> very interesting change exactly for this reason.
> 
> Where did you read that dropping USE_THE_REPOSITORY_VARIABLE is a
> good idea?
I mentioned this at the bottom of v1:
Show 5 quoted lines
> I originally intended to attempt the #FIXME in t1006-cat-file.sh.
> I followed the clues all the way here, only to discover that the
> FIXME required a level of expertise far beyond my capabilities,
> so I gave up. However, I spot the global variable here, so I went
> ahead and fixed it 😉

In other words, I just happened to see this thing. I didn't go looking for it ;)

Show 5 quoted lines
> As somebody (Phillip?) said earlier, we probably should update
> document and clearly say that removing USE_THE_REPOSITORY_VARIABLE
> is not a high-value target when done in the builtin/ directory, even
> though it is very desirable thing to do for more library-ish part of
> the codebase.

I am fully aware of this, and I did not specifically modify the_repository in builtin/ during previous patches. It's just that this macro makes me particularly uncomfortable, and I believe it would be better to remove it.

On the other hand, this patch is indeed boring and useless. Feel free to ignore it.

Regards,
Yuchen
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “builtin/mktree: remove USE_THE_REPOSITORY_VARIABLE”
  1. builtin/mktree: remove USE_THE_REPOSITORY_VARIABLETian Yuchen, Mar 12, 2026
  2. Junio C HamanoMar 12, 2026
  3. Tian YuchenMar 12, 2026
  4. Junio C HamanoMar 12, 2026

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.