-
Notifications
You must be signed in to change notification settings - Fork 899
Introduce Remote.IsSupportedUrl() #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -304,5 +304,19 @@ public void CanNotRenameWhenRemoteWithSameNameExists() | |||
Assert.Throws<NameConflictException>(() => repo.Network.Remotes.Rename("origin", "upstream")); | |||
} | |||
} | |||
|
|||
[Theory] | |||
[InlineData("[email protected]:org/repo")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change the test data to be somewhat more generic, since git, http, https, ftp, ftps have the same standard: protocol://site.com:port/path/to/repo.git. But I guess having them like this doesn't hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we also check that this url is supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that sounds like a great idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, should I pack the IsValidUrl to check valid_url and supported_url?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added support for IsSupportedUrl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I think we should expose both IsValidUrl()
and IsSupportedUrl()
.
Indeed, from a user perspective, knowing that an url is valid may be of little value if it's not supported by the underlying library.
I'd be 👍 to drop IsValidUrl()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped IsValidUrl due to IsSupportedUrl being a more enforced version of it.
Awesome! Just a little nitpick before merging this. Could you please reword the commit message? |
Done. |
🎱 Thanks! |
No description provided.