Conversation
Git invokes a remote helper for a URL of the form <transport>::<address>, and also for <transport>://<address> when Git does not handle the transport itself. In Git's transport_get(), any URL which passes is_url() and is not a file, git, or ssh URL is handed to the git-remote-<transport> program. In commit f137f45 we started to pass URLs with an unknown scheme through unchanged when they use the double colon form, and to treat other unknown schemes as bare SSH URLs, because the URL parser reads the host of a scp-like address such as "host:path" as a scheme. However, a URL such as "remote://git-lfs/git-lfs.git" then becomes an SSH endpoint for a host named "remote". We now also pass through URLs whose unknown scheme is followed by "://", as Git does, and add a test case for this form next to the existing one for the double colon form.
somaz94
marked this pull request as ready for review
October 1, 2026 08:06
somaz94
added a commit
to somaz94/somaz94
that referenced
this pull request
Oct 1, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Git invokes a remote helper for both the
<transport>::<address>and the<transport>://<address>forms, butNewEndpointonly passed the double colon form through. A URL likeremote://git-lfs/git-lfs.gitfell into the bare SSH fallback and becamehttps://remote///git-lfs/git-lfs.gitwith an SSH host ofremote.This passes an unknown scheme followed by
://through unchanged as well, which matches Git:transport_get()hands anyis_url()URL that is not file, git or ssh togit-remote-<transport>. Scp-likehost:pathaddresses still take the SSH path.Validation: the new
TestEndpointParsingcase fails on main with the SSH misparse above and passes here.make testand the full shell suite (make -C t, 825 tests) pass locally.t-smudge.sh, which points origin at an unknownhttpnope://URL and expects the download to fail, still passes.Fixes #6094
Assisted by Claude Code.