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

From: Junio C Hamano <[email-masked]>
Date: Thu, 15 Aug 2024 07:43:05 -0700

Phillip Wood <[email-masked]> 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/[email-masked]/, 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.