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

Re: [PATCH] init: show absolute path of (re)initialized repository

From
Matt Hunter <m@lfurio.us>
Date
Oct 20, 2026, 09:13 UTC
Message-ID
<DM9JTHREBQOW.3IOHX6OZK3BGQ@lfurio.us>
In-Reply-To
<atcQb_V69vvKnxoF@pks.im>
On Tue Oct 20, 2026 at 2:55 AM EDT, Patrick Steinhardt wrote:
Show 8 quoted lines
> On Tue, Oct 20, 2026 at 01:38:47AM -0400, Matt Hunter wrote:
>> 
>> None of the discussion [1] around the original patch indicates that this
>> change was intentional, so address the regression by similarly using
>> repo_get_git_dir in this code's new location.
>
> This indeed wasn't an intentional change. I also confirmed that with
> v2.55 we print the full path.

And with 2.56 :-) Output changed right at the beginning of this release cycle.

Show 6 quoted lines
>
>> In this case, git_dir is referencing owned memory that is later freed,
>> so declare a new variable to hold the used string.
>
> This sentence doesn't add any value as it simply explains parts that are
> obvious when reading the patch. I'd just drop it.
Yeah.. Will do
Show 5 quoted lines
>
>> +		int len = strlen(full_git_dir);
>
> I was wondering whether we want to fix the variable type to be a
> `size_t` while at it. But maybe we should just keep it as-is.

It's not of consequence to this change, but I agree it would be more correct. I'll include it.

>
> I'm a bit on the fence about whether we want to have a regression test
> or not. It feels like a very specific thing in the user-facing output,
> so it's a bit dubious whether it's really worth it.
This is my thought exactly.
> But on the other
> hand, folks like you seem to care enough to make the test worthwhile, so
> maybe we should have one?

I could be convinced to add one. I'll see if additional feedback comes in before sending a new revision, but won't plan for a test as of now.

Thanks for the review
>
> Thanks!
>
> Patrick
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 3 of 15 in “init: show absolute path of (re)initialized repository”
  1. init: show absolute path of (re)initialized repositoryMatt Hunter, Oct 20, 2026
  2. Patrick SteinhardtOct 20, 2026
  3. Matt HunterOct 20, 2026
  4. Patrick SteinhardtOct 20, 2026
  5. Harald NordgrenOct 20, 2026
  6. Patrick SteinhardtOct 20, 2026
  7. Harald NordgrenOct 20, 2026
  8. Junio C HamanoOct 20, 2026
  9. init: show absolute path of (re)initialized repositoryMatt Hunter, Oct 22, 2026
  10. Patrick SteinhardtOct 23, 2026
  11. Matt HunterOct 23, 2026
  12. Patrick SteinhardtOct 26, 2026
  13. init: show absolute path of (re)initialized repositoryMatt Hunter, Oct 28, 2026
  14. Patrick SteinhardtOct 28, 2026
  15. Junio C HamanoOct 28, 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.