import type { NOOPAccessor } from '../../../../accessor/base.ts';
import { PathSpec } from '../../../../types.ts';
import type { CommandFnResult, Context } from '../../../config.ts';
import { type Advertisement } from './transport.ts';
import type { ReadOnlyRefusal } from './types.ts';
/** The directory git names a clone after when none is given. */
export declare function defaultDirectory(url: string): string;
/** The branch a clone checks out and the commit it starts at. */
export declare function remoteHead(adv: Advertisement, chosen: string | null): [string | null, string | null];
/**
 * Clone a repository into a new directory.
 *
 * A path or `file://` URL is a repository inside the workspace, an `https://`
 * one is fetched over smart HTTP. Every branch lands as a remote-tracking ref
 * and every tag as a tag, and the remote's HEAD branch is checked out. A failed
 * clone removes what it wrote, and keeps a directory that was already there,
 * empty, as git does. `credentials` is the Authorization `gh repo clone` sends,
 * scoped to the URL's origin as userinfo is and never written to the clone's
 * config.
 */
export declare function clone(_accessor: NOOPAccessor, paths: PathSpec[], texts: string[], ctx: Context, credentials?: Readonly<Record<string, string>>): Promise<CommandFnResult>;
/** clone's refusal by a read-only mount, at the work tree it could not make. */
export declare const cloneReadOnly: ReadOnlyRefusal;
//# sourceMappingURL=clone.d.ts.map