Closed kaplanelad closed 2 years ago
@kaplanelad thanks for the contribution!
I am noticing an increase of working around the organization identification from the URL. My initial approach was not well thought out, and that's my bad.
Ideally you should not need to be so mindful about adding ssh://
for parse to work as expected. I have https://github.com/tjtelan/git-url-parse-rs/issues/10 tracking this future behavior change.
That being said, I think this looks good enough to solve your use-case. I'll publish this crate update soon. Thanks again!
bors r+
Thanks @tjtelan
Hey, In Gerrit source code there is no organization in the remote URL
Gerrit repo remote origin URL:
in this case, when trying to parse the remote URL I get the error:
git url is not of expected format
.How to test it:
GitUrl::parse
on the git remote URLFix
If the Git URL is not strat with
ssh
, keep the existing code behavior if the code starts withssh
I'm taking the position like you have today fromsplitpath
added a test case to check this scenario, and all the existing test is pass successfully