/**
 * Git helper utilities for detecting and using git safely.
 *
 * On macOS, git may be a stub that triggers Xcode Command Line Tools
 * installation popup. This helper detects the real git binary and
 * provides safe wrappers.
 *
 * Centralizes every CLI invocation of the `git` binary behind the
 * `runGit()` helper below. Call sites that previously did
 * `Bun.spawnSync(['git', ...])` ad-hoc now go through `runGit()`,
 * which gives us a single migration target if we ever want to swap
 * the underlying spawn machinery (e.g. between
 * `node:child_process`, `bun:spawn`, or a libgit2 binding).
 */
/** Result of a `runGit()` call. */
export interface GitResult {
    /** Whether the command exited 0. */
    ok: boolean;
    /** Exit code, or `null` if killed by signal. */
    exitCode: number | null;
    /** Captured stdout (UTF-8). Trimmed of trailing whitespace. */
    stdout: string;
    /** Captured stderr (UTF-8). Trimmed of trailing whitespace. */
    stderr: string;
}
/** Options for `runGit()`. */
export interface RunGitOptions {
    /** Working directory for the git invocation. */
    cwd?: string;
    /** Soft timeout in milliseconds. */
    timeoutMs?: number;
}
/**
 * Run `git <args...>` and return the captured result. Replaces the
 * scattered `Bun.spawnSync(['git', ...])` calls that used to live in
 * many places.
 *
 * The shell invocation is **not** routed through a real shell, so
 * caller arguments are passed verbatim — there's no quoting or
 * expansion to worry about. URLs, branch names, and refs containing
 * shell metacharacters are safe.
 *
 * Errors from spawning itself (e.g. `git` not on PATH) are returned
 * as `{ ok: false, exitCode: null, stderr: <message> }` rather than
 * thrown, since most callers want to fall through gracefully when
 * git is missing or stubbed.
 */
export declare function runGit(args: string[], opts?: RunGitOptions): Promise<GitResult>;
/**
 * Check if git is available and is the real git binary (not the
 * macOS stub).
 *
 * On macOS without Xcode CLT installed, /usr/bin/git exists but it's
 * a stub that triggers a popup asking to install developer tools.
 * We detect this by checking if Xcode Command Line Tools are
 * installed using `xcode-select -p`.
 */
export declare function isGitAvailable(): Promise<boolean>;
/**
 * Get the default branch name from git config, or `'main'` as
 * fallback. Returns `null` if git is not available.
 */
export declare function getDefaultBranch(): Promise<string | null>;
//# sourceMappingURL=git-helper.d.ts.map