import { type GitInfo } from "@linkshell/wire"; /** What git says about a directory; undefined when it isn't in a repository (or git is missing). */ export declare function gitInfo(path: string): Promise; /** * The branch checked out in a directory (the abbreviated commit on a detached * HEAD); undefined outside a repository. Doesn't look at the working tree, so * it stays quick in a large repository. */ export declare function gitBranch(path: string): Promise; export interface CreatedWorktree { /** The worktree's top directory. */ path: string; /** Where a session started from `cwd` works: the same place inside the worktree. */ cwd: string; branch: string; /** The repository it was made from. */ source: string; /** The commit it started at. */ base: string; } /** Letters, digits and dashes from a title, for a directory and branch name. */ export declare function slug(label: string): string; /** * Makes a worktree of the repository `cwd` is in, on a new branch at its * current commit. Uncommitted changes stay where they are. */ export declare function createWorktree(cwd: string, home: string, label: string): Promise; /** Whether removing the worktree would lose work: uncommitted changes, and commits since it was made. */ export declare function worktreeState(path: string, base: string): Promise<{ dirty: boolean; ahead: number; }>; /** Removes a worktree and the branch made for it. */ export declare function removeWorktree(worktree: { path: string; branch: string; source: string; }): Promise;