Re: [PATCH 1/1] mingw: handle absolute paths in expand_user_path()
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Nov 7, 2018, 18:52 UTC
- Message-ID
- <efd57458-07f6-2813-483b-dc7fba785dc0@kdbg.org>
- In-Reply-To
- <nycvar.QRO.7.76.6.1811071222200.39@tvgsbejvaqbjf.bet>
Am 07.11.18 um 12:23 schrieb Johannes Schindelin:
Show 19 quoted lines
> On Tue, 6 Nov 2018, Johannes Sixt wrote: > >> Am 06.11.18 um 15:53 schrieb Johannes Schindelin via GitGitGadget: >> Even if a path looks like a POSIX paths, i.e. it starts with a directory >> separator, but not with drive-letter-colon, it still has a particular meaning, >> namely (as far as I know) that the path is anchored at the root of the drive >> of the current working directory. >> >> If a user specifies such a path on Windows, and it must undergo >> expand_user_path(), then that is a user error, or the user knows what they are >> doing. >> >> I think it is wrong to interpret such a path as relative to some random other >> directory, like this patch seems to do. > > Okay, now we know everything you find wrong with the current patch. Do you > have any suggestion how to make it right? I.e. what would you suggest as a > way to specify in a gitconfig in a portable Git where the certificate > bundle is?
Ah, so your actual problem is quite a different one!
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.
-- Hannes