Thread (1 message) 1 message, 1 author, 2024-08-15

Re: [PATCH v2 2/3] safe.directory: normalize the configured path

From: Junio C Hamano <hidden>
Date: 2024-08-15 14:43:08

Phillip Wood [off-list ref] writes:
Fair enough. I will note though that this change makes it much more
likely that "safe.directory=." will match as it now behaves like
"*". Previously it only matched when we tried to match it against "."
whereas now it matches any directory.
Unless you are commenting on my earlier unpublished draft, I doubt
that it is the case.  

If I did the code analysis correctly when I responded to Peff in
https://lore.kernel.org/git/xmqq4j86g948.fsf@gitster.g/ (local), that is.

There are some negative tests added by the series to verify that dot
is really "current directory" and not "any directory" which is what
'*' is for (and as I always tell my contributors, we should really
get in the habit of writing more negative tests, exactly for things
like this where we do not want a "feature" to trigger in cases we do
not want them to).

Ahh, if your e-mail header is correct, you are commenting on the
implementation in v2, which did not care if the input were absolute
or not?  If so, then your confusion is somewhat understandable.

The things changed before the final edition v4 happened and it is
slightly tigher than the version you are commenting on.  We refuse
to match any non-absolute path, except for ".", since v3.  But I
think even with the looser implementation of v2, the negative test
would have made sure that "." was really "current and not any".

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help