Expand description
Read-only Git queries of the auto-push, each with a deadline and separate output streams. What: Run one read-only Git query with a deadline and separate output streams. Why: The auto-push asks Git a handful of questions before it pushes, and a question that never returns would hold the commit and the branch’s push lock for good. A query that outlives its deadline is stopped and reported, so the commit stays saved.
In TS you’d write (pseudocode):
const { exitCode, stdout, stderr } = await nanoSpawn(gitPath, args, { cwd, signal: AbortSignal.timeout(deadlineMs) });Structs§
- Query
Output - What: What a finished query printed and how it ended. Why: Callers read an exit code as an answer (“not an ancestor”) or a failure, never both.
Constants§
- QUERY_
CEILING - The longest a query may run whatever the push deadline is: queries read local repository state and finish in milliseconds.
Functions§
- query_
deadline - What: The deadline of a query: the push deadline, but never more than the ceiling. Why: One setting bounds every Git child of the auto-push, and a long push deadline must not stretch queries.
- run_
bounded_ query - What: Run a query command to its end or its deadline. Why: Both streams go to anonymous files, so no reader thread can outlive a stopped query. A query past its deadline is a coordination failure, not an answer.