fix: merger uses HEAD not hardcoded main for diff/log context

This commit is contained in:
Dustin Byrne
2026-03-26 00:37:48 -04:00
parent 20264a854d
commit af69220031

View File

@@ -129,7 +129,7 @@ export async function aiMergeTask(
let commitLog = "";
let diffStat = "";
try {
commitLog = execSync(`git log main..${branch} --format="- %s"`, {
commitLog = execSync(`git log HEAD..${branch} --format="- %s"`, {
cwd: rootDir,
encoding: "utf-8",
}).trim();
@@ -137,7 +137,7 @@ export async function aiMergeTask(
commitLog = "(unable to read commit log)";
}
try {
diffStat = execSync(`git diff main..${branch} --stat`, {
diffStat = execSync(`git diff HEAD..${branch} --stat`, {
cwd: rootDir,
encoding: "utf-8",
}).trim();