export type GitCheckout = { /** Absolute path of the repository root. */ root: string; /** * The GitHub repository `origin` points at, as an `owner/name` full name. * Undefined when there is no `origin` or it names some other host. */ repository: string | undefined; /** * The default branch of `origin`, from `refs/remotes/origin/HEAD`. Undefined * when that ref was never written — a `--single-branch` clone, or a remote * added by hand — in which case the caller leaves the field to the platform * default rather than guessing from the local `HEAD`. */ defaultBranch: string | undefined; }; /** * Parse a git remote URL into a GitHub `owner/name`, or undefined when it does * not name one. */ export declare function parseGitHubRemote(url: string): string | undefined; /** * The repository root at or above `startDir`, or undefined when it is not in * one. A worktree or submodule has `.git` as a FILE, so mere existence is the * test — not `isDirectory`. */ export declare function gitRoot(startDir: string): string | undefined; /** * The repo-relative path of `dir` inside `root`, in posix form (the separator * every consumer of `rootDirectory` splits on). Undefined when `dir` IS the * root, so the field stays absent rather than carrying a meaningless ".". */ export declare function repoRelativeDirectory(root: string, dir: string): string | undefined; /** Read the git facts for the checkout `startDir` sits in. */ export declare function readGitCheckout(startDir: string): Promise; //# sourceMappingURL=git.d.ts.map