You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[fix] Thread context through the git package (#283) (#299)
* [fix] Thread context through git package; drop non-cancellable Run/RunInDir
Thread ctx context.Context (first param) through all git package functions
so SIGINT and MCP per-request deadlines cancel in-flight git subprocesses.
Remove Run/RunInDir from the Runner interface, ExecRunner, and the debug
decorator — the context.Background() shim can no longer be reintroduced.
Recovery/rollback paths (AbortRebase, MergeAbort, StashApply, StashDrop,
MoveWorktree) deliberately stay non-cancellable, each with a doc comment
explaining why: completing them is required to avoid SIGKILL-mid-restore
data loss or stranded worktrees.
Closes#283
* [chore] Rename RunContext→Run, RunInDirContext→RunInDir; fix review issues
Since the context.Background() shims are gone, the Context suffix is no
longer needed to distinguish variants. Rename to the cleaner form.
Also fix code review findings:
- Remove dead Run/RunInDir shim methods from ctxMockRunner in sync_ctx_test.go
- Add non-cancellable doc comment to stashRefBySHA (called only from StashDrop)
* [chore] Address review feedback: drop misleading ctx params, rename stale test fields
- Remove ctx from restoreStash/applyStashToWorktree (non-cancellable recovery paths
should not accept ctx at all — matches StashApply/StashDrop/MoveWorktree pattern)
- Rename stubRunner fields runContextCalled→runCalled, runInDirCtxCalled→runInDirCalled
in debug_test.go to match the renamed Run/RunInDir methods
* [chore] Put ctx first in runInitFresh signature (Go convention)
0 commit comments