Skip to content

Commit 7d64c67

Browse files
authored
⚡️ Add ssh://git@github.com/flutter/flutter.git as a standard remote (#131333)
Resolves #98020.
1 parent 252973c commit 7d64c67

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/flutter_tools/lib/src/version.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ class VersionUpstreamValidator {
689689
static final List<String> _standardRemotes = <String>[
690690
'https://github.com/flutter/flutter.git',
691691
'git@github.com:flutter/flutter.git',
692+
'ssh://git@github.com/flutter/flutter.git',
692693
];
693694

694695
// Strips ".git" suffix from a given string, preferably an url.

packages/flutter_tools/test/general.shard/version_test.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ void main() {
325325
const String flutterStandardUrlDotGit = 'https://github.com/flutter/flutter.git';
326326
const String flutterNonStandardUrlDotGit = 'https://githubmirror.com/flutter/flutter.git';
327327
const String flutterStandardSshUrlDotGit = 'git@github.com:flutter/flutter.git';
328+
const String flutterFullSshUrlDotGit = 'ssh://git@github.com/flutter/flutter.git';
328329

329330
VersionCheckError? runUpstreamValidator({
330331
String? versionUpstreamUrl,
@@ -394,6 +395,10 @@ void main() {
394395
expect(runUpstreamValidator(versionUpstreamUrl: flutterStandardSshUrlDotGit), isNull);
395396
});
396397

398+
testWithoutContext('does not return error at full ssh url with FLUTTER_GIT_URL unset', () {
399+
expect(runUpstreamValidator(versionUpstreamUrl: flutterFullSshUrlDotGit), isNull);
400+
});
401+
397402
testWithoutContext('stripDotGit removes ".git" suffix if any', () {
398403
expect(VersionUpstreamValidator.stripDotGit('https://github.com/flutter/flutter.git'), 'https://github.com/flutter/flutter');
399404
expect(VersionUpstreamValidator.stripDotGit('https://github.com/flutter/flutter'), 'https://github.com/flutter/flutter');

0 commit comments

Comments
 (0)