All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: Stefan Metzmacher <metze@samba.org>,
	git@vger.kernel.org, Derrick Stolee <stolee@gmail.com>
Subject: Re: safe.directory wildcards
Date: Fri, 31 May 2024 10:18:28 +0200	[thread overview]
Message-ID: <ZlmH1CFZWHokAqso@tanuki> (raw)
In-Reply-To: <xmqqplt4zjw7.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

On Wed, May 29, 2024 at 09:02:16AM -0700, Junio C Hamano wrote:
> Stefan Metzmacher <metze@samba.org> writes:
> 
> > given the recent importance of safe.directory, it would be great to
> > have something like '/data/git/*' to be supported, not just a single '*'
> > for a server that serves a lot of public git repositories owned by different owners.
> 
> Interesting.
> 
> The original commit that introduced the '*' opt-out, 0f85c4a3
> (setup: opt-out of check with safe.directory=*, 2022-04-13), was
> done to specifically help those who have a large list of shared
> repositories.  We could have moved all the way to allow globs back
> then, and the possibility certainly was brought up.
> 
>   https://lore.kernel.org/git/xmqqk0bt9bsb.fsf@gitster.g/
> 
> But the loosening was done in a context of "brown paper bag fix"
> so it is very much understandable that we did the simplest and most
> obvious thing to avoid making silly mistakes in a haste.
> 
> I am reluctant to use wildmatch() but I would expect that in
> practice "leading path matches" (in other words, "everything under
> this directory is OK") is sufficient, perhaps?

Is there any particular reason why you don't want to use wildmatch?
I'd think it to be a natural fit here, and it would provide a superset
of functionality provided by leading paths, only.

Patrick

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2024-05-31  8:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29  9:08 safe.directory wildcards Stefan Metzmacher
2024-05-29 16:02 ` Junio C Hamano
2024-05-29 16:35   ` Konstantin Ryabitsev
2024-05-29 18:15   ` Stefan Metzmacher
2024-05-31  8:18   ` Patrick Steinhardt [this message]
2024-05-31 14:35     ` Chris Torek
2024-05-31 14:49     ` 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=ZlmH1CFZWHokAqso@tanuki \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=metze@samba.org \
    --cc=stolee@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.