/** * @param {string} gitRoot * @param {string} branch * @param {string | undefined} preferredRemote * @param {{ runCommand: typeof import("../exec.js").runCommand }} deps */ export declare function resolvePushTarget(gitRoot: string, branch: string, preferredRemote: string | undefined, deps: any): Promise<{ remote: string; remoteBranch: string; refspec: string; trackedRemote: string; trackedMergeRef: string; }>; /** * @param {string} targetsPath * @param {{ pathExists: (path: string) => Promise, readText: (path: string) => Promise }} deps */ export declare function parseSubmoduleTargetsFile(targetsPath: string, deps: any): Promise<{ parsed: Map; errors: string[]; }>; /** * @param {string} repoPath * @param {{ pathExists: (path: string) => Promise, runCommand: typeof import("../exec.js").runCommand }} deps * @returns {Promise} */ export declare function isGitRepository(repoPath: string, deps: any): Promise; /** * D5.1/D5.2 auto-discovery: when no `submodules.targets` file exists, discover * submodules from `.gitmodules` and fast-forward push each one whose HEAD is * ahead of `origin/`. * * Push failures are logged with the FULL submodule name + error details and * swallowed — an auto-push failure must never abort the main finish flow. * * @param {string} gitRoot * @param {string} baseBranch * @param {{ * pathExists: (path: string) => Promise, * runCommand: typeof import("../exec.js").runCommand * }} deps * @returns {Promise<{ processed: number, pushed: number, skipped: number, failures: number }>} */ export declare function autoDiscoverPushSubmodules(gitRoot: string, baseBranch: string, deps: any): Promise<{ processed: number; pushed: number; skipped: number; failures: number; }>; /** * @param {string} gitRoot * @param {string} changeId * @param {string} baseBranch * @param {{ * pathExists: (path: string) => Promise, * readText: (path: string) => Promise, * runCommand: typeof import("../exec.js").runCommand, * UserError: typeof import("../errors.js").UserError * }} deps * @param {{ autoPushSubmodules?: boolean }} [options] default true: auto-discover * .gitmodules submodules when `submodules.targets` is absent (D5.1/D5.2). */ export declare function pushSubmodulesForFinish(gitRoot: string, changeId: string, baseBranch: string, deps: any, options?: { autoPushSubmodules?: boolean; }): Promise<{ processed: number; mergedShas: never[]; pushed?: undefined; skipped?: undefined; failures?: undefined; } | { processed: number; mergedShas: never[]; pushed: number; skipped: number; failures: number; } | { processed: number; mergedShas?: undefined; pushed?: undefined; skipped?: undefined; failures?: undefined; }>; /** * @param {string} gitRoot * @param {{ changeId?: string, into?: string, base?: string }} options * @param {{ * assertValidChangeId: (changeId: string) => void, * checkGitClean: (gitRoot: string) => Promise<{ clean: true } | { clean: false, details: string }>, * currentBranch: (gitRoot: string) => Promise, * pathExists: (path: string) => Promise, * readText: (path: string) => Promise, * resolveChangeId: (gitRoot: string, changeId: string | undefined, options: { command: string }) => Promise, * runCommand: typeof import("../exec.js").runCommand, * UserError: typeof import("../errors.js").UserError * }} deps */ export declare function resolveFinishContext(gitRoot: string, options: any, deps: any): Promise<{ changeId: any; changeBranch: string; changeBranchRef: string; into: string; cur: any; }>; export declare function stageFinishCloseout(gitRoot: string, changeId: string, deps: { runCommand: typeof import("../exec.js").runCommand; }): Promise<{ staged: boolean; }>;