/** * @file `getTreeManifest` — the `git ls-tree -r ` manifest of a commit. * Every line is ` \t`; the blob SHAs are git's * immutable content addresses and `ls-tree` output is git-version-stable, so * a hash of this manifest is an UNMOVABLE content fingerprint tied to the * commit — a reproducible content pin for a source whose host serves no * stable archive (a gitiles `+archive` .tar.gz is gzip-timestamped and * regenerated per fetch, i.e. movable under your feet). Requires the ref be * present in `cwd`'s repo, such as a materialized submodule worktree. */ import type { GitPathOptions } from './tracked.js'; /** * The raw `git ls-tree -r ` manifest for `ref` in `cwd`'s repo. Rejects * when the ref is absent (unmaterialized submodule / unknown commit) — the * caller distinguishes "cannot pin" from "empty tree" — and throws on a present * ref that yields no output. Hash the returned string (e.g. SHA-256) to get the * unmovable content pin. * * @example * ;```typescript * const manifest = await getTreeManifest('HEAD', { cwd: worktree }) * const pin = createHash('sha256').update(manifest).digest('hex') * ``` */ export declare function getTreeManifest(ref: string, options?: GitPathOptions | undefined): Promise;