RecordingGitRunner class
A recording GitRunner: records every git argv (with its cwd) in order,
and returns a configurable result so commit/push read ok. Wrap it in the
real GitOps so the land step's real add -A / commit -m / push -u
argv is what gets recorded (Fakes, not mocks).
Constructors
Properties
-
calls
→ List<
({List< String> args, String workDir})> -
Every (workDir, args)
gitinvocation, in call order.final - exitCode ↔ int
-
The exit code the next runs return (0 ⇒
ok). Settable so a test can make a step fail.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subcommands
→ List<
String> -
The flattened leading subcommands of every recorded
gitcall, in order (['add', 'commit', 'push']for a clean land).no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
{required String workingDirectory, required List< String> args}) → Future<GitRunResult> -
Runs
git [args]withworkingDirectoryas the cwd. The implementation MUST strip thegitEnvBlacklistkeys from the inherited environment before exec (gc's clean-env build,git.go:314-320) so a parentGIT_DIR/GIT_WORK_TREE/… from a melos/hook context can never redirect the command to the wrong repository. Never throws — a launch failure is reported asGitRunResult.launched== false. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited