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

Re: safe.directory wildcards

From
SMStefan Metzmacher <metze@samba.org>
Date
May 29, 2024, 18:15 UTC
Message-ID
<22b487e8-b845-43f9-8abe-5f96a756b376@samba.org>
In-Reply-To
<xmqqplt4zjw7.fsf@gitster.g>
Am 29.05.24 um 18:02 schrieb Junio C Hamano:
Show 19 quoted lines
> 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?

That's exactly what I tried first and then looked at the sources to check why it doesn't help :-)

I guess it will be useful to have.

Thanks! metze

Previous: Konstantin RyabitsevNext: Patrick Steinhardt
Message 4 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.