startGitProcess function

Future<GitProcess> startGitProcess(
  1. String executable,
  2. List<String> arguments, {
  3. String? workingDirectory,
  4. required Map<String, String> environment,
})

The default GitProcessStarter: Process.start without the parent's environment. Its GitProcess.kill uses taskkill /T /F on Windows. On POSIX it recursively checks live parentage before killing descendants, then Git. That is best effort: a helper already reparented, a new child forked during cleanup or a tree exceeding the cleanup limit may escape. A host that needs stronger ownership supplies its own process starter.

Implementation

Future<GitProcess> startGitProcess(
  String executable,
  List<String> arguments, {
  String? workingDirectory,
  required Map<String, String> environment,
}) async => _LocalGitProcess(
  await Process.start(
    executable,
    arguments,
    workingDirectory: workingDirectory,
    environment: environment,
    includeParentEnvironment: false,
  ),
);