/** * Running git, and what comes back from it. * * `git.ts` and `worktree.ts` each carried the same ten-line runner, and `git.ts` * carried two more near-identical functions for piping a commit message and a * patch to git's standard input. * * Only the running lives here. **Which** commands are allowed stays the decision * `git.ts` makes, in its own file, where a reader asking "can this thing push" * answers it by reading a list of functions. */ /** * What a git call gives back: a value, or git's own words about why not. * * A typed result rather than an exception, for the same reason a workflow turns * a model failure into `ok: false`: a commit that could not be made is an * outcome the caller must decide about, not a crash. */ export type GitResult = { ok: true; value: T; } | { ok: false; error: string; }; /** * Runs one git command. Arguments are an array: no shell, no interpolation. * `env` is added to this process's own, for the index a read of the tree * builds apart from the repository's. */ export declare function git(cwd: string, args: string[], env?: Readonly>): Promise>; /** * The same, with `input` piped to git's standard input. * * This is how a commit message and a patch both get in. A message written by a * model holds quotes, backticks and newlines, and a patch is worse; neither * should ever reach a shell, and there is no shell here at all. * * A trailing newline is added when there is none: git wants one, and a caller * building a patch by joining lines is the ordinary case. */ export declare function gitWithInput(cwd: string, args: string[], input: string): Promise>; //# sourceMappingURL=run.d.ts.map