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

Re: Regarding the depreciation of ssh+git/git+ssh protocols

From
Jeff King <peff@peff.net>
Date
Mar 16, 2021, 21:28 UTC
Message-ID
<YFEjCU1jgrsPIhvk@coredump.intra.peff.net>
In-Reply-To
<C9YUBUYH7PWU.3PHDZR2YCUEOX@taiga>
On Tue, Mar 16, 2021 at 10:21:13AM -0400, Drew DeVault wrote:
Show 14 quoted lines
> > It's difficult enough to handle parsing of SSH specifications and
> > distinguish them uniformly from Windows paths (think of an alias named
> > "c"), so I'd prefer we didn't add additional complexity to handle this
> > case.
> 
> There's no additional complexity here: git remotes are URIs, and any
> implementation which parses them as such already deals with this case
> correctly. Any implementation which doesn't may face all kinds of
> problems as a consequence: SSH without a user specified, HTTPS with
> Basic auth in the URI username/password fields (or just the password,
> which is also allowed), and so on. Any sane and correct implementation
> is pulling in a URI parser here, and if not, I don't think it's fair for
> git to constrain itself in order to work around some other project's
> bugs.

Git remotes are most definitely not just URIs. Some valid remotes are: ".", "foo", "/tmp/foo", "c:\foo", "example.com:foo". The parser inside Git has rules to distinguish these from actual rfc3986-compliant URIs.

Now I don't know much about the parsing code in, say, git-lfs, or how much of pain it would be to add a new scheme for something that _does_ conform to rfc3986. But it's not necessarily as easy as "you should be using a compliant URI parser".

-Peff
Previous: Drew DeVaultNext: Drew DeVault
Message 15 of 27 in “Regarding the depreciation of ssh+git/git+ssh protocols”
  1. Drew DeVaultMar 15, 2021
  2. Jonathan NiederMar 15, 2021
  3. Drew DeVaultMar 15, 2021
  4. brian m. carlsonMar 15, 2021
  5. Drew DeVaultMar 16, 2021
  6. Jonathan NiederMar 16, 2021
  7. Drew DeVaultMar 16, 2021
  8. Jeff KingMar 16, 2021
  9. Drew DeVaultMar 17, 2021
  10. Junio C HamanoMar 18, 2021
  11. Drew DeVaultMar 18, 2021
  12. Eli SchwartzMar 16, 2021
  13. brian m. carlsonMar 16, 2021
  14. Drew DeVaultMar 16, 2021
  15. Jeff KingMar 16, 2021
  16. Drew DeVaultMar 17, 2021
  17. Jakub NarębskiMar 17, 2021
  18. Drew DeVaultMar 17, 2021
  19. brian m. carlsonMar 17, 2021
  20. Drew DeVaultMar 18, 2021
  21. Eli SchwartzMar 16, 2021
  22. Jonathan NiederMar 17, 2021
  23. Eli SchwartzMar 31, 2021
  24. Mark LodatoApr 7, 2021
  25. Junio C HamanoApr 7, 2021
  26. Kerry, RichardApr 13, 2021
  27. Drew DeVaultMar 16, 2021

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.