Re: Regarding the depreciation of ssh+git/git+ssh protocols
- From
Jeff King <peff@peff.net>
- Date
- Mar 16, 2021, 21:23 UTC
- Message-ID
- <YFEh2LxvsSP+x7d2@coredump.intra.peff.net>
- In-Reply-To
- <C9YDEO8Z8J96.262IOS9IW6F39@taiga>
On Mon, Mar 15, 2021 at 09:05:34PM -0400, Drew DeVault wrote:
Show 14 quoted lines
> On Mon Mar 15, 2021 at 9:02 PM EDT, Jonathan Nieder wrote: > > I'm not sure it's a disconnect; instead, it just looks like we > > disagree. That said, with more details about the use case it might be > > possible to sway me in another direction. > > > > To maintain the URI analogy: the URI does not tell me the content-type > > of what I can access from there. Until I know that content-type, I > > may not know what the best tool is to access it. > > git isn't a content type, it's a protocol. git over HTTP or git over SSH > is a protocol in its own right, distinct from these base protocols, in > the same sense that SSH lives on top of TCP which lives on top of IP > which is transmitted to your computer over ethernet or 802.11. It's > turtles all the way down.
I think this is the key observation. A browser can access an HTTP URL, and then based on the content type, decide what to do with the result. But one cannot do so with a git-over-http URL. Git will not even directly access the resource specified in the URL! It will construct a related one (with appending "info/refs" and a "service" field) and request that.
So you definitely need to "somehow" know that a URL is meant to be used with Git. And that makes me somewhat sympathetic to your request.
The downsides I see are:
- one of the advantages of straight http:// URLs is that they can
accessed by multiple tools. Most "forge" tools let you use the same
URL both for getting a human-readable page in a browser, as well as
accessing the repository with the Git CLI. I'd hate to see https+git
URLs become common, because they add friction there (though simply
supporting them at all gives people the choice of whether to use
them). - I'm also sympathetic to brian's point that there's a wider
ecosystem. It's not just "git" that needs to learn them. It's jgit,
and libgit2, and many tools that work with git remotes.-Peff