aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2020-08-01 21:21:53 +0200
committerTeddy Wing2020-08-01 21:21:53 +0200
commite0f75bb732e2f1c66a9121142399bcd1d604a4f3 (patch)
treec891e4a47b1d4e766de396e3337c5bd682aa0422 /src/lib.rs
parentd64951ef8fc55733d6b87a0ea6f1a16186eba3d2 (diff)
downloadgit-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/lib.rs')
0 files changed, 0 insertions, 0 deletions