Class GoalCommitLedger
java.lang.Object
network.ike.plugin.ws.GoalCommitLedger
The committed-work ledger of a publish goal (IKE-Network/ike-issues#954).
A publish goal that owns its commits (#919, #780) ends by showing the
operator exactly what it committed — not a working-tree status check,
which is empty by design once every goal-authored change is committed.
The ledger derives that inventory from git truth: the caller records each
repository's HEAD immediately after the goal's preflight proved
the tree free of uncommitted changes (baselineSha),
lets the goal run, then collects
git log --name-status baseline..HEAD per repository. Because the
preflight guaranteed a committed baseline, every commit in the range is
provably goal-authored — including commits made by delegated subprocesses
(the per-subproject ike:scaffold-publish fan-out) that the
workspace mojo cannot otherwise observe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne goal-authored commit.static final recordOne repository's ledger entry. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbaselineSha(File dir) The repository's currentHEADshort SHA, for use as the ledger baseline — ornullfor a repository with no commits yet (an unbornHEAD), in which case the whole history at collect time is goal-authored.static GoalCommitLedger.RepoChangesCollect one repository's ledger entry: the goal-authored commits inbaseline..HEAD(each with subject, short SHA, and changed files) plus any uncommitted residue.
-
Method Details
-
baselineSha
The repository's currentHEADshort SHA, for use as the ledger baseline — ornullfor a repository with no commits yet (an unbornHEAD), in which case the whole history at collect time is goal-authored.- Parameters:
dir- the repository root directory- Returns:
- the baseline short SHA, or
nullwhen the repository has no commits yet
-
collect
Collect one repository's ledger entry: the goal-authored commits inbaseline..HEAD(each with subject, short SHA, and changed files) plus any uncommitted residue. Collection is best-effort — a repository whose log cannot be read (e.g.HEADstill unborn) reports no commits rather than failing the goal's report.- Parameters:
label- the repository label shown in reportsdir- the repository root directorybaselineSha- theHEADrecorded bybaselineSha(File)before the goal ran;nullmeans the repository had no commits then, so the whole history is goal-authored- Returns:
- the repository's ledger entry
-