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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/08/2024 18:15, Junio C Hamano wrote:
Phillip Wood <phillip.wood123@xxxxxxxxx> writes:

On 25/07/2024 17:11, Junio C Hamano wrote:
Phillip Wood <phillip.wood123@xxxxxxxxx> writes:

I think this is sensible if the key is an absolute path, if the key is
a relative path I think we should ignore it as it is not clear which
directory the user meant.
The only thing that worries me in that proposal is that doing so
would break a configuration that used to work.  I'd rather leave
the tightening of it to future work with its own justification.

As far as I know the only caller that tried to match a relative
directory was enter_repo(), all of the other code paths pass an
absolute path from getcwd(). Before this series git daemon required
the relative directory "." to be specified in addition to the absolute
path so that will not be broken by removing support for relative
directories. Are there other users of enter_repo() that still rely on
being able to match relative paths?

Offhand I do not know of any, but no guarantees.  I am tempted to
leave it as a prerequisite task for those who want to tighten this
codepath further.

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.

Best Wishes

Phillip




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux