import type { FlagView } from '../../../spec/flag_view.ts';
import type { MailmapEntry, RepoLocation } from './types.ts';
import type { Files } from '../../../../workspace/files.ts';
/**
 * Read Git's four mailmap identity forms.
 *
 * Pinned against git 2.47.3 (Debian stable) and 2.50.1: only a `#` in the
 * first column starts a comment, and the second email may be empty (`<>`)
 * while the first may not.
 */
export declare function parseMailmap(text: string): readonly MailmapEntry[];
/**
 * Map one `Name <email>` identity the way git's mailmap does.
 *
 * An entry naming both the recorded name and email wins outright, the last
 * such line replacing any earlier one. Without one, the entries naming the
 * email alone apply, each later line overriding the part it spells.
 */
export declare function mappedIdentity(identity: string, entries: readonly MailmapEntry[]): string;
/** Read the worktree mailmap through the workspace data plane. */
export declare function loadMailmap(vfs: Files, location: RepoLocation, exact?: boolean): Promise<readonly MailmapEntry[]>;
/** Apply explicit mailmap switches in command-line order. */
export declare function useMailmap(fl: FlagView, enabled: boolean): boolean;
//# sourceMappingURL=mailmap.d.ts.map