Skip to main content

auto_push

Function auto_push 

Source
pub fn auto_push(
    git: &PushGit,
    landed_oid: &str,
    err: &mut dyn Write,
) -> Result<AutoPushResult, SingleFlightError>
Expand description

What: Back up a landed commit by pushing its branch, single-flight per branch. Why: The commit has happened by the time this runs and Git ignores a post-commit hook’s status, so a failed push or a failed coordination is printed and returned as Failed, and never fails the commit. Failures before the push decision (an unreadable repository, a Git that cannot start) are returned as errors.

In TS you’d write (pseudocode):

async function autoPush({ gitPath, cwd, landedOid }): Promise<AutoPushResult>;