Unverified Commit eae77804 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] use -f when fetching tags (#58703)

use -f to overwrite local tags on master branch
parent 720b7cb4
......@@ -749,7 +749,7 @@ class GitTagVersion {
if (channel == 'dev' || channel == 'beta' || channel == 'stable') {
globals.printTrace('Skipping request to fetchTags - on well known channel $channel.');
} else {
_runGit('git fetch $_flutterGit --tags', processUtils, workingDirectory);
_runGit('git fetch $_flutterGit --tags -f', processUtils, workingDirectory);
}
}
final List<String> tags = _runGit(
......
......@@ -573,7 +573,7 @@ void main() {
environment: anyNamed('environment'),
)).thenReturn(RunResult(ProcessResult(108, 0, 'master', ''), <String>['git', 'fetch']));
when(processUtils.runSync(
<String>['git', 'fetch', 'https://github.com/flutter/flutter.git', '--tags'],
<String>['git', 'fetch', 'https://github.com/flutter/flutter.git', '--tags', '-f'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).thenReturn(RunResult(ProcessResult(109, 0, '', ''), <String>['git', 'fetch']));
......@@ -599,7 +599,7 @@ void main() {
environment: anyNamed('environment'),
)).called(1);
verify(processUtils.runSync(
<String>['git', 'fetch', 'https://github.com/flutter/flutter.git', '--tags'],
<String>['git', 'fetch', 'https://github.com/flutter/flutter.git', '--tags', '-f'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).called(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment