import type { FlagView } from '../../../spec/types.ts'; import { type CommitFacts } from './format.ts'; import { gitFs } from './fs.ts'; import type { CLIDoors } from '../../types.ts'; import type { Dispatch, RepoLocation } from './types.ts'; /** * A repository living in a mount, opened for reading. * * `fs` is the whole bridge: isomorphic-git reaches every byte through it, so its * own algorithms (history walk, tree diff, three-way merge) run against a mount * without ever learning that one exists. Nothing here is loaded eagerly, which * is also what git does. * * Objects come from the common directory and refs from both: a linked worktree * shares the object database and the branches of the repository it was cut from, * and owns only HEAD and whatever refs are per-checkout. */ export interface Repo { readonly fs: ReturnType; readonly dispatch: Dispatch; readonly location: RepoLocation; /** How many hex digits this repository abbreviates an id to. */ readonly abbrev: number; } /** The argument bag every isomorphic-git call in this package shares. */ export declare function repoArgs(repo: Repo): { fs: never; dir: string; gitdir: string; }; /** * Discover and open the repository a verb was invoked against. * * Every verb starts the same way: honor `-C`, walk up to the mount root looking * for a `.git`, then open the object database across the dispatcher. Kept in one * place so a new verb inherits the discovery rules rather than restating them. * * @param fl the leaf's flag bag, read for `-C` * @param statPath dispatcher-backed stat, both channels * @param mountRoot the mount prefix serving a path * @param dispatch workspace op dispatcher */ export declare function opened(fl: FlagView, doors: CLIDoors): Promise; /** * One commit as the renderers want it. * * isomorphic-git reports the timezone the way `Date.getTimezoneOffset()` does, * negated minutes east of UTC, so `+0530` arrives as `-330`. git prints the * other sign, and this is the one place the two conventions meet. */ export declare function commitFacts(repo: Repo, oid: string): Promise; //# sourceMappingURL=repo.d.ts.map