Skip to main content

Module maintenance_run

Module maintenance_run 

Source
Expand description

Running automatic maintenance after a landing: the config read, then git maintenance run --auto. What: Running automatic maintenance after a landing: one git config read for the maintenance keys, then git maintenance run --auto --quiet, detached or not, in the real worktree. Its exit status is returned for the caller to ignore, as native Git does. Why: Every landing migrates its objects into one pack; without this step the pack count grows by one per commit and every later Git process searches every pack. Failures are logged and never fail the landed commit.

In TS you’d write (pseudocode):

await runAutoMaintenance({ gitPath, cwd, globalArgs });

Enums§

AutoMaintenanceOutcome
What: What automatic maintenance did. Why: Configuration can turn it off, which is not an exit status; the caller distinguishes the two.

Functions§

run_auto_maintenance
What: Run automatic maintenance in the real worktree with the caller’s global options. Why: The read and the run happen in the same order the incumbent uses, so the decision and its effect agree on one configuration snapshot per read.