export interface GitOptions { cwd?: string; } export interface PrepareGitHistoryOptions extends GitOptions { remote?: string; codeQualityArtifacts?: string[]; } export declare function git(args: string[], options?: GitOptions): Promise; /** * Diff the target branch with the MR head commit, not `HEAD`: CI checks out a * merge commit (GitHub `refs/pull/N/merge`, GitLab merged results) whose base * can be stale, and then `HEAD` carries commits the MR does not change. */ export declare function getMergeDiffArguments(targetBranch: string, headSha: string, options?: { remote?: string; context?: number; }): string[]; /** * Full git argv for the merge diff. `-c core.quotepath=false` keeps non-ASCII * paths literal instead of git's default octal-escaped + double-quoted form * (`"a/caf\303\251.ts"`), which the comment-position parser cannot match — * leaving such comments with invalid one-sided positions that 500 on * `bulk_publish`. Diffing literally also gives the reviewer readable paths. */ export declare function getMergeDiffCommand(targetBranch: string, headSha: string, options?: { remote?: string; context?: number; }): string[]; export declare function removeGeneratedCodeQualityArtifacts(paths?: string[], options?: GitOptions): Promise; export declare function prepareGitHistory(sourceBranch: string, targetBranch: string, headSha: string, options?: PrepareGitHistoryOptions): Promise; export declare function getMergeDiff(targetBranch: string, headSha: string, options?: GitOptions & { remote?: string; context?: number; }): Promise; export declare function getMergeCommitLogArguments(targetBranch: string, headSha: string, options?: { remote?: string; }): string[]; export declare function getMergeCommitLog(targetBranch: string, headSha: string, options?: GitOptions & { remote?: string; }): Promise; export interface DiffSummary { filesChanged: number; linesAdded: number; linesRemoved: number; } /** * Summarize a unified diff into file/line counts for telemetry. Counts one file * per `diff --git` header and counts `+`/`-` lines only inside a hunk (after a * `@@` header), so the `--- a/file` / `+++ b/file` header lines are excluded and * a genuine content line whose text starts with `++`/`--` is still counted. Pure * and allocation-light so it can run on the full merge diff without an extra git * invocation. */ export declare function summarizeDiff(diff: string): DiffSummary; //# sourceMappingURL=git.d.ts.map