atproto git client atgc.codes

feat(git): stop a stalled git network call after a deadline #1454

targeting main from claude/git-timeouts
Merged opened by and assigned to orbit-nodachi.test.pds.did.bot
targeting main from claude/git-timeouts

Today pr create, pr resubmit and pr diff run git's network commands — push, fetch, ls-remote and clone — with no wall-clock limit, so a knot that accepts a connection and then stalls hangs the command forever. When atgc is killed, its git and ssh children keep running.

This gives those commands a 300-second deadline, overridable with ATGC_GIT_TIMEOUT (0 disables it). On timeout it kills git and the ssh it started, then exits 6 with a sentence naming the verb, the remote and the limit. The commands stay in atgc's process group, so a terminal interrupt still reaches the whole tree, and local git commands keep no deadline.

before and after

🤖 Generated with Claude Code

Commits 1

feat(git): stop a stalled git network call after a deadline