From: "Matt Hunter" <m@lfurio.us>
To: "Patrick Steinhardt" <ps@pks.im>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH] init: show absolute path of (re)initialized repository
Date: Tue, 20 Oct 2026 05:13:07 -0400 [thread overview]
Message-ID: <DM9JTHREBQOW.3IOHX6OZK3BGQ@lfurio.us> (raw)
In-Reply-To: <atcQb_V69vvKnxoF@pks.im>
On Tue Oct 20, 2026 at 2:55 AM EDT, Patrick Steinhardt wrote:
> 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.
>
>> 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
>
>> + 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
next prev parent reply other threads:[~2026-10-20 9:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 5:38 [PATCH] init: show absolute path of (re)initialized repository Matt Hunter
2026-10-20 6:55 ` Patrick Steinhardt
2026-10-20 9:13 ` Matt Hunter [this message]
2026-10-20 12:14 ` Patrick Steinhardt
2026-10-20 12:37 ` Harald Nordgren
2026-10-20 14:37 ` Patrick Steinhardt
2026-10-20 15:32 ` Harald Nordgren
2026-10-20 16:29 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM9JTHREBQOW.3IOHX6OZK3BGQ@lfurio.us \
--to=m@lfurio.us \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox