Expand description
VCS-specific helpers built on procpilot. Adds jj/git shorthand
wrappers, repo detection, and output parsers.
For generic subprocess execution (stdin, retry, timeout, custom envs),
use procpilot::Cmd directly — it’s re-exported here for convenience.
Modules§
- prelude
- Common types and helpers for everyday VCS subprocess work.
Structs§
- Bookmark
- A jj bookmark with sync status.
- Bookmark
Parse Result - Result of parsing bookmark output, including any skipped entries.
- Cmd
- Builder for a subprocess invocation or pipeline.
- CmdDisplay
- Owned snapshot of a command’s program + args, formatted shell-style on
Display. For pipelines, renders each stage separated by|. - File
Change - A single file change in a diff summary.
- GitRemote
- A git remote.
- LogEntry
- A jj log entry parsed from jj template JSON output.
- LogParse
Result - Result of parsing log output, including any skipped entries.
- Retry
Policy - How retries are scheduled and which errors trigger them.
- RunOutput
- Captured output from a successful command.
- Spawned
Process - Handle to one or more spawned subprocesses (a single command or a pipeline).
Enums§
- Conflict
State - Whether a jj commit has unresolved conflicts.
- Content
State - Whether a jj commit is empty (no file changes).
- File
Change Kind - The kind of change a file underwent in a diff.
- Redirection
- Where a child process’s stdout or stderr goes.
- Remote
Status - Sync status of a bookmark relative to its remote.
- RunError
- Error type for subprocess execution.
- Stdin
Data - Input data to feed to a child process’s stdin.
- VcsBackend
- Which version control system is managing a directory.
- Working
Copy - Whether a jj commit is the current working copy.
Constants§
- BOOKMARK_
TEMPLATE - jj template for
jj bookmark listproducing line-delimited JSON. - LOG_
TEMPLATE - jj template for
jj logproducing line-delimited JSON entries. - STREAM_
SUFFIX_ SIZE - Maximum bytes of stdout/stderr retained on
NonZeroExitandTimeouterror variants. Anything beyond this is dropped from the front (FIFO), keeping the most recent output — usually the most relevant for debugging.
Functions§
- binary_
available - Check whether a binary is available on PATH.
- binary_
version - Return a binary’s
--versionoutput, if available. - default_
transient - Default transient-error predicate.
- detect_
vcs - Detect the VCS backend for a path, without running any subprocesses.
- git_
available - Check whether the
gitbinary is available on PATH. - git_
merge_ base - Find the merge base of two revisions in a git repository.
- git_
version - Get the git version string, if available.
- is_
transient_ error - Default transient-error check for jj/git.
- jj_
available - Check whether the
jjbinary is available on PATH. - jj_
merge_ base - Find the merge base of two revisions in a jj repository.
- jj_
version - Get the jj version string, if available.
- parse_
bookmark_ output - Parse
jj bookmark list --template BOOKMARK_TEMPLATEoutput. - parse_
diff_ summary - Parse
jj diff --summaryoutput into structuredFileChangevalues. - parse_
git_ diff_ name_ status - Parse
git diff --name-statusoutput into structuredFileChangevalues. - parse_
log_ output - Parse
jj log --template LOG_TEMPLATEoutput. - parse_
remote_ list - Parse
jj git remote listoutput intoGitRemotevalues. - run_git
- Run a
gitcommand in a repo directory, returning captured output. - run_
git_ with_ retry - Run a
gitcommand with retry on transient errors. - run_
git_ with_ timeout - Run a
gitcommand with a timeout. - run_jj
- Run a
jjcommand in a repo directory, returning captured output. - run_
jj_ with_ retry - Run a
jjcommand with retry on transient errors. - run_
jj_ with_ timeout - Run a
jjcommand with a timeout.