git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Handling of paths

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 20, 2017, 19:42 UTC
Message-ID
<xmqq7ez2lwsv.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAG0OSgdEE3g-ugEJU4EZqfbxZ=3h2WPdLC4W4mG7b6UeTaXQ-Q@mail.gmail.com>
Victor Toni <victor.toni@gmail.com> writes:
> What's unexpected is that paths used for sslKey or sslCert are treated
> differently insofar as they are expected to be absolute.
> Relative paths (whether with or without "~") don't work.

Looking at http.c::http_options(), I see that "sslcapath" and "sslcainfo" do use git_config_pathname() when grabbing their values, but "sslcert" and "sslkey" treat the value as a plain vanilla string without expecting "~[username]/" at all.

The modern http.c codestructure was introduced at 29508e1e ("Isolate shared HTTP request functionality", 2005-11-18) and was corrected for interation between the multiple configuration files in 7059cd99 ("http_init(): Fix config file parsing", 2009-03-09), but back in these versions, all of them including "sslcapath" and "sslcainfo" were all treated as plain vanilla strings.

It appears that only two of these among four were made aware of the "~[username]/" prefix in bf9acba2 ("http: treat config options sslCAPath and sslCAInfo as paths", 2015-11-23), but "sslkey" and "sslcert" were still left as plain vanilla strings. I do not know if that was an elaborate omission, or a mere oversight, as it seems that it happened while I was away, so...

Previous: Victor ToniNext: Charles Bailey
Message 2 of 8 in “Handling of paths”
  1. Victor ToniJul 19, 2017
  2. Junio C HamanoJul 20, 2017
  3. Charles BaileyJul 20, 2017
  4. Junio C HamanoJul 20, 2017
  5. Charles BaileyJul 20, 2017
  6. Victor ToniJul 20, 2017
  7. Junio C HamanoJul 21, 2017
  8. Jeff KingJul 24, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.