Re: [PATCH 1/1] mingw: handle absolute paths in expand_user_path()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 8, 2018, 03:26 UTC
- Message-ID
- <xmqqlg648d1u.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20181108011813.GA10148@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> I think we would want to carefully think about the call in enter_repo(). > We do not want git-daemon to accidentally expose repositories in > $RUNTIME_PREFIX. > > Looking over the code, I think this is OK. The expansion happens in > enter_repo(), and then we take the path that was found and do our > ok_paths checks on it (which makes sense -- even now you'd ask to export > "/home/" and it would need to look at "~peff/repo.git" and expand that > to "/home/peff/repo.git" before doing a simple string check.
Yup, that is another reason why I think this new "expansion feature" belongs to the function, not to a wrapper that is aware of this new feature in addition to ~tilde expansion.
Show 6 quoted lines
>> Between ~<reserved name> and $VARIABLE_LOOKING_THINGS, I do not have >> a strong preference either way, but I am getting an impression that >> the latter is more generally favoured in the discussion? > > I certainly prefer the latter, but I thought I was the only one to have > expressed support so far. ;)
The first mention of pseudo-variable I saw was in Duy's message, wondering if $ROOT is more appropriate than "/", and I counted it as supporting the $VARIABLE syntax.