type GitCommandOptions = { env?: NodeJS.ProcessEnv; input?: string | NodeJS.ArrayBufferView; }; type GitTreeEntry = { mode: string; type: "blob" | "tree" | "commit"; object: string; name: string; }; type GitLongTreeEntry = GitTreeEntry & { size: number | null; }; type WorktreeChange = { path: string; kind?: string; originalPath?: string; }; export declare function runGit(root: string, args: readonly string[], { env, input }?: GitCommandOptions): { error: Error | null; ok: boolean; status: number | null; stderr: string; stdout: string; }; export declare function observeGitCommands(observer: ((args: readonly string[]) => void) | null, callback: () => T | Promise): Promise; export declare function sanitizeGitMessage(value: string): string; export declare function inspectTreeEntry(root: string, tree: string, path: string): GitTreeEntry | null; export declare function listTreeEntries(root: string, tree: string, path: string): GitTreeEntry[]; export declare function inspectTree(root: string, tree: string, path: string): GitLongTreeEntry[]; export declare function inspectTreeLineage(root: string, tree: string, path: string): GitLongTreeEntry[]; export declare function gitObjectSize(root: string, object: string): number; export declare function readGitBlob(root: string, object: string): Buffer; export declare function readGitBlobs(root: string, objects: Iterable | null | undefined): Map; export declare function inspectTreePaths(root: string, tree: string, paths: string[]): Map; export declare function worktreeSnapshot(root: string, { paths, reuseIndex, authenticateSources, }?: { paths?: string[]; reuseIndex?: boolean; authenticateSources?: boolean; }): { tree: string; }; export declare function parseWorktreeChanges(source: string): Record<"staged" | "unstaged" | "untracked" | "conflicted", WorktreeChange[]>; export declare function parseRepositoryStatus(source: string): { branch: string | null; changes: Record<"staged" | "unstaged" | "untracked" | "conflicted", WorktreeChange[]>; head: string | null; }; export declare function inspectRepositoryState(root: string): { changes: Record<"staged" | "unstaged" | "untracked" | "conflicted", WorktreeChange[]>; head: string | null; branch: { branch: null; remote: null; repository: null; upstreamBranch: null; } | { branch: string; remote: any; repository: any; upstreamBranch: any; }; }; export declare function inspectWorktreeChanges(root: string): Record<"staged" | "unstaged" | "untracked" | "conflicted", WorktreeChange[]>; export declare function resolveHead(root: string): string | null; export declare function inspectCurrentBranch(root: string): { branch: null; remote: null; repository: null; upstreamBranch: null; } | { branch: string; remote: string | null; repository: null; upstreamBranch: string | null; } | { branch: string; remote: string; repository: string | null; upstreamBranch: string; }; export declare function compareCommits(root: string, local: string, remote: string): "unknown" | "aligned" | "behind" | "ahead" | "diverged"; export declare function resolveCommit(root: string, revision: string): string; export declare function resolveSnapshot(root: string, revision: string): { commit: string; tree: string; }; export declare function indexSnapshot(root: string): { tree: string; }; export declare function fetchRepositoryBranch(root: string, repository: string, branch: string): string; export declare function fetchPrimary(root: string, config: { version?: number; primaryRepository: string; primaryBranch: string; }): string; export declare function withTemporaryWorktree(root: string, commit: string, callback: (snapshot: string, tree: string) => T | Promise): Promise; export declare function withTemporaryTree(root: string, tree: string, callback: (worktree: string, tree: string) => T | Promise): Promise; export {}; //# sourceMappingURL=git.d.ts.map