magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
1 min read

stage-all

A deny rule: it refuses a whole-tree git add (-A, -u, ., --all, --update), which sweeps in regenerated output, and names what to run instead.

What it catches

A whole-tree git add (-A, -u, ., --all, --update), which sweeps in regenerated output.

Why

A magus target writes its declared outputs as it runs, so the tree here is routinely dirty with files you did not edit. -A sweeps those and any build residue into a commit about something else, with no signal that it happened, and -u reaches the same outputs: it stages every TRACKED change across the whole tree, which is the same sweep minus files that are merely untracked, and a target's declared outputs are ordinarily tracked already. Measured: one such call put 69 files, a whole regenerated docs site plus five untouched source files, into a commit about four collection methods. magus vcs add classifies every dirty path against the declared output globs, keeps a source change and the outputs it produced together, and reports anything undeclared instead of staging it.

Seeing it

A verdict names its rule in brackets, which is how you got here:

deny [stage-all]: ...

magus describe rule stage-all prints the same entry at a terminal, and magus describe rules lists every rule this workspace enforces.

See also

  • All rules - what this workspace enforces, deny first
  • The guard - how a verdict is reached and wired
guardrulesstage-alldeny
Last updated (27cfc5db)
Earlier changes on this page (1)

Full history ↗ · Blame source ↗

Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. See workspace.

Target

A named operation (build, test, ...) you invoke with magus run <target>; it may compose a spell's tool-native operations and depend on other targets. See targets.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.