handle unrelated history promotion fallback
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-07 18:07:30 +09:00
parent 89b0b7d15c
commit aef91b51bb
+21 -7
View File
@@ -714,13 +714,27 @@ export class AppsService {
if (!isUnrelatedHistoryError(message)) {
throw error;
}
await execFileAsync(gitBin, [
...mergeOptions,
'merge',
'--allow-unrelated-histories',
'--no-ff',
commitSha,
], { cwd: workDir });
try {
await execFileAsync(gitBin, [
...mergeOptions,
'merge',
'--allow-unrelated-histories',
'--no-ff',
'--no-edit',
commitSha,
], { cwd: workDir });
} catch {
await execFileAsync(gitBin, [
...mergeOptions,
'merge',
'--allow-unrelated-histories',
'--no-ff',
'--no-edit',
'-X',
'theirs',
commitSha,
], { cwd: workDir });
}
}
} else {
await execFileAsync(gitBin, [