CloneUrl Validation: We do not support the git protocol

Well, we actually do support it, but I don't want users to use it,
as I have no intention of supporting it in the future.

In the future - Git will be written entirely in Dart.
This commit is contained in:
Vishesh Handa
2019-12-22 18:49:46 +01:00
parent ad0c305597
commit 764209fe57

View File

@ -185,7 +185,11 @@ String _isCloneUrlValid(String value) {
if (value.isEmpty) {
return 'Please enter some text';
}
if (value.startsWith('https://') || value.startsWith('http://')) {
if (value.startsWith('https://') ||
value.startsWith('http://') ||
value.startsWith('git://') ||
value.startsWith('ssh+git://') ||
value.startsWith('git+ssh://')) {
return 'Only SSH urls are currently accepted';
}