Re: [PATCH 1/1] mingw: handle absolute paths in expand_user_path()
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Nov 7, 2018, 21:36 UTC
- Message-ID
- <e7ff6f22-fe5a-3cca-9305-2c8a6fb55d45@kdbg.org>
- In-Reply-To
- <20181107204142.GA30078@sigill.intra.peff.net>
Am 07.11.18 um 21:41 schrieb Jeff King:
Show 18 quoted lines
> On Wed, Nov 07, 2018 at 07:52:28PM +0100, Johannes Sixt wrote: >> Do I understand correctly, that you use a leading slash as an indicator to >> construct a path relative to system_path(). How about a "reserved" user >> name? For example, >> >> [http] sslcert = ~system_path/what/ever >> >> although a more unique name, perhaps with some punctuation, may be >> desirable. > > It's syntactically a bit further afield, but something like: > > [http] > sslcert = $RUNTIME_PREFIX/what/ever > > would make sense to me, and is a bit less subtle than the fake user. I > don't know if that would confuse people into thinking that we > interpolate arbitrary environment variables, though.
The expansion of a fake user name would have to go in expand_user_path(), a fake variable name would have to be expanded elsewhere. Now, Dscho mentions in the cover letter that his patch has already seen some field testing ("has been 'in production' for a good while"). So, we have gained some confidence that the point where the substitution happens, in expand_user_path(), is suitable. Therefore, I have slight preference for a fake user.
-- Hannes