export interface RemoteSpec { /** What `git clone` is given. */ url: string; /** Path segments under /repos, e.g. ["acme", "api"]. */ segments: string[]; } /** * A remote `link` clones: `github:owner/repo`, an https://, ssh:// or file:// URL, or `git@host:owner/repo.git`. * Anything else (a directory, a file) is `undefined`: a mistyped path never turns into a request to a server. * Throws for a remote it will not clone: a credential inside the URL, plain http or git://, or a path it cannot name. */ export declare function parseRemote(target: string): RemoteSpec | undefined; export declare function cloneDestination(home: string, spec: RemoteSpec, into?: string): string; export interface CloneResult { dir: string; /** False when the destination already held this repository. */ cloned: boolean; /** The checked-out branch; `project_refresh` only follows `main`. */ branch: string; } /** * Clone `spec` into `dest`, or accept `dest` when it already is a checkout of the same remote (so the command can be * run again). Never prompts; Git's own message is not repeated, since it can quote a credential helper's output. */ export declare function cloneRemote(spec: RemoteSpec, dest: string, env?: NodeJS.ProcessEnv, timeoutMs?: number): Promise;