Re: [PATCH 02/13] urlmatch: define url_parse function
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- May 2, 2024, 04:02 UTC
- Message-ID
- <20240502040207.GA26134@tb-raspi4>
- In-Reply-To
- <rt77kwzaia3w52o3hoeodjilk5gkh6dz5dip6wmn5hia55gp2r@5fznbu2ljdqy>
[]
Show 13 quoted lines
> Interesting. > > ` > $ ./git url-parse -c protocol file:/test/test > ssh > ` > > seems like only having a single slash after the 'protocol:' prints > 'ssh' always (I think this may not even be a valid url). After this 'else' > block, the url turns into 'ssh://file/test/test'. Will examine the details > later. Not that it's your code's doing, and rather the result of > url_is_local_not_ssh(). But just wanted to point this out and ask if this > should error out or is this an intended behavior that I can't figure out.
ssh is the correct answer, try something like
`git clone localhost:/home/myself/project/git.git`
It is the scp syntax, supported by Git as well. From `man scp`
scp copies files between hosts on a network.
[]
The source and target may be specified as a local pathname,
a remote host with optional path in the form
[user@]host:[path],
or a URI in the form scp://[user@]host[:port][/path].
Local file names can be made explicit using absolute or relative pathnames
to avoid scp treating file names containing ‘:’ as host specifiers.So yes, they share similar problems with the ':' that could mean different things when using the short form.