From cb75173562b40a49e177429fef0d094cb652644a Mon Sep 17 00:00:00 2001 From: peppa-bot Date: Tue, 24 Nov 2026 19:24:06 +0000 Subject: [PATCH] =?UTF-8?q?PEP-269:=20=D1=81=D0=BF=D0=B8=D1=81=D0=BE=D0=BA?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BD=D1=84=D0=BB=D0=B8=D0=BA=D1=82=D1=83=D1=8E?= =?UTF-8?q?=D1=89=D0=B8=D1=85=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20?= =?UTF-8?q?=E2=80=94=20git=20=D1=81=20=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=BE=D0=BC=20=D0=BF=D0=BE=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8,=20=D1=8D=D1=81=D0=BA=D0=B0=D0=BB=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BD=D0=B5=20=D0=B2=D0=B8=D1=81=D0=BD=D0=B5?= =?UTF-8?q?=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- packages/runner/src/conflict-step.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/runner/src/conflict-step.ts b/packages/runner/src/conflict-step.ts index f34c6d4c..d1c06df8 100644 --- a/packages/runner/src/conflict-step.ts +++ b/packages/runner/src/conflict-step.ts @@ -28,7 +28,7 @@ import { import { settings, keyPrefix, type Db } from "@peppa/db"; import { asIs, m } from "@peppa/shared/i18n"; import { requestRebase } from "./flow.ts"; -import { git } from "./git.ts"; +import { credentialHelper, run } from "./git.ts"; import { resolveTaskById } from "./sessions.ts"; type Log = (m: string) => void; @@ -74,6 +74,16 @@ export function setConflictFilesLister(f: FilesLister | null): void { filesLister = f ?? gitConflictFiles; } +/** A git call bounded in time: the list of files must never hold the escalation (CI, a slow Gitea). */ +const GIT_TIMEOUT_MS = 20_000; +const git = (cwd: string, ...args: string[]) => + run("git", ["-c", "credential.helper=", "-c", `credential.helper=${credentialHelper()}`, ...args], { + cwd, + timeout: GIT_TIMEOUT_MS, + killSignal: "SIGKILL", + env: { ...process.env, GIT_TERMINAL_PROMPT: "0" }, + }); + /** * The files that conflict: fetch both heads into the project's working copy (objects and * FETCH_HEAD only, the working tree is untouched) and `git merge-tree` them. Null — unknown.