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
+14
View File
@@ -714,13 +714,27 @@ export class AppsService {
if (!isUnrelatedHistoryError(message)) { if (!isUnrelatedHistoryError(message)) {
throw error; throw error;
} }
try {
await execFileAsync(gitBin, [ await execFileAsync(gitBin, [
...mergeOptions, ...mergeOptions,
'merge', 'merge',
'--allow-unrelated-histories', '--allow-unrelated-histories',
'--no-ff', '--no-ff',
'--no-edit',
commitSha, commitSha,
], { cwd: workDir }); ], { cwd: workDir });
} catch {
await execFileAsync(gitBin, [
...mergeOptions,
'merge',
'--allow-unrelated-histories',
'--no-ff',
'--no-edit',
'-X',
'theirs',
commitSha,
], { cwd: workDir });
}
} }
} else { } else {
await execFileAsync(gitBin, [ await execFileAsync(gitBin, [