GitRunner typedef

GitRunner = Future<GitResult> Function(List<String> arguments, {WayfinderCancellation? cancel, String? workingDirectory})

Runs git with arguments in workingDirectory. The resolver's only way to touch a repository, so a host can supply its own process layer and a test can prove which commands ran. A runner stops the command and throws WayfinderException.cancelled() when cancel fires.

A host that only needs its own way of starting processes passes a GitProcessStarter to runGit, which keeps every other part of its hardening. A runner of its own applies the same: wayfinderGitOptions, wayfinderGitEnvironment with wayfinderConfiguredSshCommand, a bound on stdout that never returns part of it, and a kill of the command's process tree.

Implementation

typedef GitRunner =
    Future<GitResult> Function(
      List<String> arguments, {
      String? workingDirectory,
      WayfinderCancellation? cancel,
    });