Re: [PATCH 1/1] Git.pm: add semicolon after catch statement
- From
Jeff King <peff@peff.net>
- Date
- Nov 10, 2022, 21:41 UTC
- Message-ID
- <Y21wHWXyO/J+Jn9O@coredump.intra.peff.net>
- In-Reply-To
- <28orrrr1-444q-6595-po76-3nr67r1pp4p0@tzk.qr>
On Thu, Nov 10, 2022 at 04:10:22PM +0100, Johannes Schindelin wrote:
Show 15 quoted lines
> Hi Peff, > > On Mon, 17 Oct 2022, Jeff King wrote: > > > [... talking about safe.directory ...] > > > > But curiously this still does not pass after your patch, because we seem > > to actually open the repository! I think this is because the C code > > allows an explicit GIT_DIR to override the safe-directory checks. > > Yes, I remember that this was something we discussed at some length during > the embargo: what to do with the explicitly-specified `GIT_DIR` when > verifying the ownership, and my recollection is that we asserted that > setting `GIT_DIR` qualifies for "they know what they're doing" (in > particular when it is done in a script, not interactively).
Thanks for confirming. I'm not sure if you read the rest of the thread, but the bug turned out to be in Git.pm, which sets GIT_DIR without knowing what it's doing. :)
We ended up with 20da61f25f (Git.pm: trust rev-parse to find bare repositories, 2022-10-22) as the fix.
-Peff