Expand description
The working tree as a handoff brief reads it: branch, HEAD, the dirty
paths and the diffβs stat.
Three probes rather than the diff scanner, which walks every changed file and may ask GitHub about a pull request - a brief is written in the moment a session swaps and cannot wait on either.
Re-exportsΒ§
use std::path::Path;πuse std::time::Duration;πuse forge_primitives::HandoffGitState;πuse super::git_command;π
ConstantsΒ§
- DIFF_
CAP π - DIRTY_
CAP π - How many dirty paths and diff lines the brief keeps. The brief is capped by the data it names, so the read is capped here rather than by a consumer.
- PROBE_
TIMEOUT π - Each probeβs own budget. A wedged git costs the brief that probe and no more; the swap is already under way when this runs.
FunctionsΒ§
- capped_
lines π - The last
capnon-blank lines, and how many there were in all: the part of a long list that says what the successor will meet, and the count the brief states so the cap is not read as the whole. - probe
- Read the three facts. A directory that is not a repository answers with everything absent, which is a fact the brief states rather than an error.
- run π
- One git line of output, or
Nonewhen it failed, timed out or was empty.