Expand description
Git-flow operations implemented with plain git commands.
Structs§
- Branch
Info - Summary of a feature branch for the
devflow listcommand. - GitFlow
- Repository helper bound to a project root.
Enums§
- Ancestor
Status - Result of checking whether
origin/mainis already an ancestor ofHEAD— i.e. whetherscripts/sync-main-to-develop.shwould be a no-op — WITHOUT issuing anygit fetch(20d, review: Codex HIGH — a “read-only” preflight must not depend on the network). - GitError
- Errors produced by git-flow operations.
Constants§
- ALSO_
REDIRECTING_ GIT_ VARS - Variables that are not repository-local — and so absent from
--local-env-vars— but still redirect where git reads or writes. - REPO_
LOCAL_ GIT_ VARS - Git’s own list of repository-local environment variables, as reported by
git rev-parse --local-env-vars(15 entries on git 2.55).
Functions§
- git_
command - A
gitcommand pinned torepoand stripped of every inherited variable that could redirect it somewhere else. - hermetic_
command - As
git_command, for a program that is notgititself but will shell out to it —cargo, whose build scripts invokegit, is the motivating case. The redirecting variables are inherited all the way down a process tree, so scrubbing only the directgitcalls would leave that path open. - origin_
main_ ancestor_ status - Check whether
origin/mainis an ancestor ofHEAD, against ALREADY-FETCHED local refs — issues NOgit fetch. Mirrorsscripts/sync-main-to-develop.sh’s owngit merge-base --is-ancestor origin/main HEADinvocation (:41), minus the precedinggit fetch(:38), which mutates.git/FETCH_HEAD/tracking refs and would make a “read-only” preflight false (20d, review: Codex HIGH). - publish_
order - Derive the crates.io publish order for a workspace’s local-path members
(e.g.
devflow-corebeforedevflow) — sourced from the workspace’s own[workspace] memberslist and each member’s own[dependencies]section (which member depends on which), never a hardcoded prose string (20d). Read-only; returns an emptyVec(never panics) if the workspace Cargo.toml or a member manifest cannot be read. - ref_
is_ ancestor - Whether the
ancestorref is an ancestor of thedescendantref, against ALREADY-FETCHED local refs — issues NOgit fetch. Generalisesorigin_main_ancestor_statusto an arbitrary ref pair (used byrelease --verify’s post-cut checks: is the release tag onmain, and has themain→developsync run). Distinguishes “not an ancestor” (exit 1) from “a ref is absent” (exit 128) so the caller can degrade to an actionablegit fetchmessage instead of reporting a false divergence.