Unverified Commit cfcb9887 authored by Dan Field's avatar Dan Field Committed by GitHub

Do not use --first-parent when determining version on master (#69726)

parent 496efca1
......@@ -779,7 +779,7 @@ class GitTagVersion {
// recent tag and number of commits past.
return parse(
_runGit(
'git describe --match *.*.* --first-parent --long --tags',
'git describe --match *.*.* --long --tags',
processUtils,
workingDirectory,
)
......
......@@ -341,7 +341,7 @@ void main() {
),
const FakeCommand(
command: <String>[
'git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags',
'git', 'describe', '--match', '*.*.*', '--long', '--tags',
],
stdout: 'v1.12.16-19-gb45b676af',
),
......
......@@ -140,7 +140,7 @@ void main() {
workingDirectory: Cache.flutterRoot)).thenReturn(result);
when(processManager.runSync('git tag --points-at HEAD'.split(' '),
workingDirectory: Cache.flutterRoot)).thenReturn(result);
when(processManager.runSync('git describe --match *.*.* --first-parent --long --tags'.split(' '),
when(processManager.runSync('git describe --match *.*.* --long --tags'.split(' '),
workingDirectory: Cache.flutterRoot)).thenReturn(result);
when(processManager.runSync(FlutterVersion.gitLog('-n 1 --pretty=format:%ad --date=iso'.split(' ')),
workingDirectory: Cache.flutterRoot)).thenReturn(result);
......
......@@ -81,7 +81,7 @@ void main() {
));
processManager.addCommand(const FakeCommand(
command: <String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
command: <String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
stdout: '0.1.2-3-1234abcd',
));
......@@ -563,7 +563,7 @@ void main() {
stdout: '', // no tag
),
const FakeCommand(
command: <String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
command: <String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
stdout: '$devTag-$commitsAhead-g$headRevision',
),
],
......@@ -585,7 +585,7 @@ void main() {
environment: anyNamed('environment'),
)).thenReturn(RunResult(ProcessResult(105, 0, '', ''), <String>['git', 'fetch']));
when(processUtils.runSync(
<String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
<String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).thenReturn(RunResult(ProcessResult(106, 0, 'v0.1.2-3-1234abcd', ''), <String>['git', 'describe']));
......@@ -611,7 +611,7 @@ void main() {
environment: anyNamed('environment'),
));
verify(processUtils.runSync(
<String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
<String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).called(1);
......@@ -630,7 +630,7 @@ void main() {
environment: anyNamed('environment'),
)).thenReturn(RunResult(ProcessResult(106, 0, '', ''), <String>['git', 'fetch']));
when(processUtils.runSync(
<String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
<String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).thenReturn(RunResult(ProcessResult(107, 0, 'v0.1.2-3-1234abcd', ''), <String>['git', 'describe']));
......@@ -656,7 +656,7 @@ void main() {
environment: anyNamed('environment'),
));
verify(processUtils.runSync(
<String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
<String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).called(1);
......@@ -683,7 +683,7 @@ void main() {
<String>['git', 'tag', '--points-at', 'HEAD'],
));
when(processUtils.runSync(
<String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
<String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).thenReturn(RunResult(ProcessResult(111, 0, 'v0.1.2-3-1234abcd', ''), <String>['git', 'describe']));
......@@ -701,7 +701,7 @@ void main() {
environment: anyNamed('environment'),
)).called(1);
verify(processUtils.runSync(
<String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
<String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).called(1);
......@@ -728,7 +728,7 @@ void main() {
<String>['git', 'tag', '--points-at', 'HEAD'],
));
when(processUtils.runSync(
<String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
<String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).thenReturn(RunResult(ProcessResult(111, 0, 'v0.1.2-3-1234abcd', ''), <String>['git', 'describe']));
......@@ -866,7 +866,7 @@ void fakeData(
environment: anyNamed('environment'),
)).thenReturn(ProcessResult(106, 0, '', ''));
when(pm.runSync(
<String>['git', 'describe', '--match', '*.*.*', '--first-parent', '--long', '--tags'],
<String>['git', 'describe', '--match', '*.*.*', '--long', '--tags'],
workingDirectory: anyNamed('workingDirectory'),
environment: anyNamed('environment'),
)).thenReturn(ProcessResult(107, 0, 'v0.1.2-3-1234abcd', ''));
......
......@@ -99,7 +99,6 @@ void main() {
'describe',
'--match',
'v*.*.*',
'--first-parent',
'--long',
'--tags',
], workingDirectory: testDirectory.path);
......@@ -123,7 +122,6 @@ void main() {
'describe',
'--match',
'v*.*.*',
'--first-parent',
'--long',
'--tags',
], workingDirectory: testDirectory.path);
......
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