about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlafyDev <flafyarazi@gmail.com>2024-02-17 14:54:47 +0200
committerFlafyDev <flafyarazi@gmail.com>2024-02-17 15:34:10 +0200
commitd77999079f578c05ec1446078aa65d265b104536 (patch)
tree9048307b065a57bc3673d935f67ad386a4f159f6
parent5ec215f2166bd74022d43257dde7da90acca48d7 (diff)
flutter: remove unnecessary git-dir.patch
Flutter still works like normal with the patch `git-dir.patch` removed.
I'm not sure what it's supposed to do but I don't think it's necessary anymore.
-rw-r--r--pkgs/development/compilers/flutter/patches/git-dir.patch84
1 files changed, 0 insertions, 84 deletions
diff --git a/pkgs/development/compilers/flutter/patches/git-dir.patch b/pkgs/development/compilers/flutter/patches/git-dir.patch
deleted file mode 100644
index 6e6ae4e6fb98c..0000000000000
--- a/pkgs/development/compilers/flutter/patches/git-dir.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart
-index 9f33a22cc3..c46255742c 100644
---- a/dev/bots/prepare_package.dart
-+++ b/dev/bots/prepare_package.dart
-@@ -602,7 +602,7 @@ class ArchiveCreator {
- 
-   Future<String> _runGit(List<String> args, {Directory? workingDirectory}) {
-     return _processRunner.runProcess(
--      <String>['git', ...args],
-+      <String>['git', '--git-dir', '.git', ...args],
-       workingDirectory: workingDirectory ?? flutterRoot,
-     );
-   }
-diff --git a/packages/flutter_tools/lib/src/commands/downgrade.dart b/packages/flutter_tools/lib/src/commands/downgrade.dart
-index a58b75c009..02da0daeb7 100644
---- a/packages/flutter_tools/lib/src/commands/downgrade.dart
-+++ b/packages/flutter_tools/lib/src/commands/downgrade.dart
-@@ -120,7 +120,7 @@ class DowngradeCommand extends FlutterCommand {
-     // Detect unknown versions.
-     final ProcessUtils processUtils = _processUtils!;
-     final RunResult parseResult = await processUtils.run(<String>[
--      'git', 'describe', '--tags', lastFlutterVersion,
-+      'git', '--git-dir', '.git', 'describe', '--tags', lastFlutterVersion,
-     ], workingDirectory: workingDirectory);
-     if (parseResult.exitCode != 0) {
-       throwToolExit('Failed to parse version for downgrade:\n${parseResult.stderr}');
-@@ -192,7 +192,7 @@ class DowngradeCommand extends FlutterCommand {
-         continue;
-       }
-       final RunResult parseResult = await _processUtils!.run(<String>[
--        'git', 'describe', '--tags', sha,
-+        'git', '--git-dir', '.git', 'describe', '--tags', sha,
-       ], workingDirectory: workingDirectory);
-       if (parseResult.exitCode == 0) {
-         buffer.writeln('Channel "${getNameForChannel(channel)}" was previously on: ${parseResult.stdout}.');
-diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart
-index 0702b35e7e..36b2a95b65 100644
---- a/packages/flutter_tools/lib/src/version.dart
-+++ b/packages/flutter_tools/lib/src/version.dart
-@@ -407,7 +407,7 @@ abstract class FlutterVersion {
-   /// wrapper that does that.
-   @visibleForTesting
-   static List<String> gitLog(List<String> args) {
--    return <String>['git', '-c', 'log.showSignature=false', 'log'] + args;
-+    return <String>['git', '--git-dir','.git', '-c', 'log.showSignature=false', 'log'] + args;
-   }
- }
- 
-@@ -559,7 +559,7 @@ class _FlutterVersionGit extends FlutterVersion {
-   String? get repositoryUrl {
-     if (_repositoryUrl == null) {
-       final String gitChannel = _runGit(
--        'git rev-parse --abbrev-ref --symbolic $kGitTrackingUpstream',
-+        'git --git-dir .git rev-parse --abbrev-ref --symbolic $kGitTrackingUpstream',
-         globals.processUtils,
-         flutterRoot,
-       );
-@@ -567,7 +567,7 @@ class _FlutterVersionGit extends FlutterVersion {
-       if (slash != -1) {
-         final String remote = gitChannel.substring(0, slash);
-         _repositoryUrl = _runGit(
--          'git ls-remote --get-url $remote',
-+          'git --git-dir .git ls-remote --get-url $remote',
-           globals.processUtils,
-           flutterRoot,
-         );
-@@ -952,7 +952,7 @@ class GitTagVersion {
-     }
-     // find all tags attached to the given [gitRef]
-     final List<String> tags = _runGit(
--      'git tag --points-at $gitRef', processUtils, workingDirectory).trim().split('\n');
-+      'git --git-dir .git tag --points-at $gitRef', processUtils, workingDirectory).trim().split('\n');
- 
-     // Check first for a stable tag
-     final RegExp stableTagPattern = RegExp(r'^\d+\.\d+\.\d+$');
-@@ -973,7 +973,7 @@ class GitTagVersion {
-     // recent tag and number of commits past.
-     return parse(
-       _runGit(
--        'git describe --match *.*.* --long --tags $gitRef',
-+        'git --git-dir .git describe --match *.*.* --long --tags $gitRef',
-         processUtils,
-         workingDirectory,
-       )