diff options
author | Teddy Wing | 2020-08-01 21:21:53 +0200 |
---|---|---|
committer | Teddy Wing | 2020-08-01 21:21:53 +0200 |
commit | e0f75bb732e2f1c66a9121142399bcd1d604a4f3 (patch) | |
tree | c891e4a47b1d4e766de396e3337c5bd682aa0422 /src/bin/git-sugpatch.rs | |
parent | d64951ef8fc55733d6b87a0ea6f1a16186eba3d2 (diff) | |
download | git-suggestion-e0f75bb732e2f1c66a9121142399bcd1d604a4f3.tar.bz2 |
OwnerRepo: Parse from SSH-style paths
Remotes can be HTTP URLs or use SSH/SCP-style paths like:
git@github.com/teddywing/github-suggestion.git
We need to handle both regular URLs and the above style, which isn't
parseable by the 'url' crate.
Add a custom parsing function to get the owner and repo from this
format.
When trying to parse `OwnerRepo` from a string, first try to parse it as
a URL. If that fails with a `RelativeUrlWithoutBase` error, assume it's
the other style of reference.
Diffstat (limited to 'src/bin/git-sugpatch.rs')
0 files changed, 0 insertions, 0 deletions