ProcessGitEngine constructor
- GitRunner? runner,
- GitFileSystem? fileSystem,
- GitPlatform? platform,
- GitProcessLauncher? launcher,
- String executable = 'git',
- Map<
String, String> ? globalEnvironment, - bool windowsLongPaths = true,
- Duration? defaultTimeout = const Duration(minutes: 5),
- int? defaultMaxOutputBytes,
Builds the process engine: the git program it launches, the environment it layers over every command, its Windows long-path setting and the delay of a command that names none.
executable is the git program — a name resolved on the PATH or a
path. globalEnvironment is layered over the inherited environment of
every command, windowsLongPaths adds -c core.longpaths=true to
Windows commands, and defaultTimeout is the delay applied to a command
that carries none; a null defaultTimeout means no limit, and the
five-minute default matches ProcessGitRunner.defaultTimeout.
defaultMaxOutputBytes bounds the standard output of a command that
carries no limit of its own; null, the default, means no limit. A value
that is not positive raises an ArgumentError. platform supplies the
operating system, path style and environment the engine and its
repositories adapt to.
runner, fileSystem and launcher are injection points for tests and
for applications that bring their own execution; their types live in
package:git_engine/testing.dart. A runner already carries its
executable, environment, long-path setting, timeout and output limit, so
giving one together with executable, globalEnvironment,
windowsLongPaths, defaultTimeout or defaultMaxOutputBytes raises an
ArgumentError naming the extra parameter.
Implementation
ProcessGitEngine({
GitRunner? runner,
GitFileSystem? fileSystem,
GitPlatform? platform,
GitProcessLauncher? launcher,
String executable = 'git',
Map<String, String>? globalEnvironment,
bool windowsLongPaths = true,
Duration? defaultTimeout = const Duration(minutes: 5),
int? defaultMaxOutputBytes,
}) : this._(
providedRunner: runner,
providedFileSystem: fileSystem,
providedPlatform: platform,
providedLauncher: launcher,
executable: executable,
globalEnvironment: globalEnvironment,
windowsLongPaths: windowsLongPaths,
defaultTimeout: defaultTimeout,
defaultMaxOutputBytes: defaultMaxOutputBytes,
);