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

Re: safe.directory wildcards

From
Chris Torek <chris.torek@gmail.com>
Date
May 31, 2024, 14:35 UTC
Message-ID
<CAPx1GvcNF1_te7v3K0bN1s1OaR8JwHTgfQnoKV_tapz6qzbX7Q@mail.gmail.com>
In-Reply-To
<ZlmH1CFZWHokAqso@tanuki>
On Fri, May 31, 2024 at 1:18 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 8 quoted lines
> On Wed, May 29, 2024 at 09:02:16AM -0700, Junio C Hamano wrote:
> > 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.

I have to agree with Patrick here that wildmatch would not be surprising. If the concern is that it might be accidentally dangerous, perhaps requiring one to set two knobs might suffice?

Of course I've also thought at many times that Mercurial's "syntax: glob" and "syntax: whatever" rules were a good idea, although not necessarily that particular notation. Perhaps "safe.literal.directory" (aka safe.directory) and "safe.glob.directory"?

Chris
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 6 of 7 in “safe.directory wildcards”
  1. Stefan MetzmacherMay 29, 2024
  2. Junio C HamanoMay 29, 2024
  3. Konstantin RyabitsevMay 29, 2024
  4. Stefan MetzmacherMay 29, 2024
  5. Patrick SteinhardtMay 31, 2024
  6. Chris TorekMay 31, 2024
  7. Junio C HamanoMay 31, 2024

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.