import type { Env } from "../ci/env.js"; export interface GitOptions { debug?: ((message: string) => void) | undefined; /** Environment of the subprocess; defaults to `process.env`. */ env?: Env | undefined; /** Set over `env`. */ vars?: Readonly>; } /** `env` without `GIT_DIR`, `GIT_WORK_TREE` and `GIT_INDEX_FILE`, plus `vars`. */ export declare const gitEnv: (env: Env, vars?: Readonly>) => Record; export interface GitResult { code: number; stdout: string; stderr: string; } /** Runs `git` in `cwd`; resolves with the exit code instead of rejecting. */ export declare const git: (cwd: string, args: readonly string[], { debug, env, vars }?: GitOptions) => Promise; /** Runs `git` synchronously and returns stdout; throws on a non-zero exit code. */ export declare const gitSync: (cwd: string, args: readonly string[], { env, vars }?: GitOptions) => string; /** Runs `git` and returns stdout; throws on a non-zero exit code. */ export declare const gitOk: (cwd: string, args: readonly string[], opts?: GitOptions) => Promise;