All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Rodrigo <rodrigolive@gmail.com>,  git@vger.kernel.org
Subject: Re: [PATCH 0/2] fix bare repositories with Git.pm
Date: Fri, 13 Sep 2024 10:46:43 -0700	[thread overview]
Message-ID: <xmqq4j6jzbss.fsf@gitster.g> (raw)
In-Reply-To: <20240912223413.GA649897@coredump.intra.peff.net> (Jeff King's message of "Thu, 12 Sep 2024 18:34:13 -0400")

Jeff King <peff@peff.net> writes:

> Yikes, good catch. That's a pretty bad bug. I'm surprised we didn't
> cover this in the tests, but it's specific to bare repositories.
>
>> Bug hunting through the Git.pm code and skimming through the Git SCM
>> repo, there's a significant change (commit 20da61f25) that makes the
>> recent Git.pm rely on:
>> 
>>      git rev-parse --is-bare-repository --git-dir
>
> Yep, I confirmed via bisection that that commit is the culprit.

Yeah, it is surprising that nobody noticed it since Dec 2022.

> It does fix all cases, but it leaves some redundant code in place.
> Here are two patches. The first does the minimal fix within the code
> (what 20da61f25 should have done!) and corrects the problem. The second
> switches to --absolute-git-dir and drops the now-redundant code.
>
> Thank you for a very thorough bug report!

Yup, thanks, both.

Queued.

      parent reply	other threads:[~2024-09-13 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 16:32 Can't use bare repositories with Git.pm Rodrigo
2024-09-12 22:34 ` [PATCH 0/2] fix " Jeff King
2024-09-12 22:36   ` [PATCH 1/2] Git.pm: fix bare repository search with Directory option Jeff King
2024-09-13  6:05     ` Patrick Steinhardt
2024-09-12 22:37   ` [PATCH 2/2] Git.pm: use "rev-parse --absolute-git-dir" rather than perl code Jeff King
2024-09-13  6:05     ` Patrick Steinhardt
2024-09-13 17:46   ` Junio C Hamano [this message]

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=xmqq4j6jzbss.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=rodrigolive@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.