Skip to main content

Module manual_push_range

Module manual_push_range 

Source
Expand description

Published-set and range computation for manual-push scans: which pushed commits a remote does not have. What: The commits a push newly publishes, relative to what each destination remote already has. Why: The manual-push policies scan only what becomes public. A pushed commit is already published when a remote-tracking ref of the destination, or an authoritative prior value of an update to that remote, reaches it (src/policy-engine/manual-push-published.ts). The rest of the history is the scan’s range.

In TS you’d write (pseudocode):

const published = publishedTips({ updates, peeled, tracking });

Structs§

ManualPushRangeError
What: Why the range could not be computed. Why: Every variant stops the lifecycle with a failure event; a guessed range would hide commits from the scan.

Enums§

UpdateScope
What: The scope one pushed update contributes to the scan. Why: A deletion publishes nothing; a commit with a known published base contributes its new commits; a commit with no known base contributes its whole history’s tree.

Functions§

peel_commits
What: The commit a prior destination value names, when it exists locally and is a commit. Option<T> is “a value or nothing”. Why: Only locally present commits can bound the range; an object Git never fetched is unknown, not published.
published_tips
What: The published tips of each remote: its tracking commits and the commits of its prior destination values. Why: Every update to one remote contributes its prior value, so a second branch is bounded by the first’s prior state.
run_git_bytes
What: Run a Git query with stdin text and return its exact stdout bytes. Why: Batch queries (cat-file --batch-check, rev-list --stdin) read their requests from stdin, and any Git failure is an error, never an empty answer.
tracking_commits
What: The commits each destination remote is known to have, from its remote-tracking refs. Why: The namespace is matched literally, so a remote name is never read as a pattern.
update_scope
What: The scope of one update, from its local object and the published tips of its remote. Why: rev-list names exactly the commits the remote lacks, so a scan never repeats published history.