Expand description
The .keep files protecting a landing’s migrated pack.
What:
The .keep files that protect a landing’s migrated pack until the compare-and-swap,
named by the message cli-git <transaction-id>.
Why:
git index-pack --keep=<message> writes the .keep before the pack becomes visible,
so
no prune or repack drops the objects mid-landing;
recovery finds a dead transaction’s
.keep by its message even before a landing record names the pack
(src/policy-engine/commit-landing-objects.ts).
In TS you’d write (pseudocode):
await removeTransactionKeeps({ objectDirectory, transactionId });Functions§
- remove_
pack_ keep - What:
Remove the
.keepof one migrated pack. Why:removePackKeep: afterref-updated.json, and after a failed compare-and-swap. - remove_
transaction_ keeps - What:
Remove every
.keepwhose message names the transaction; returns how many. Why:removeTransactionKeeps: a.keepholds the message and a newline, exactly; a file that vanished meanwhile is skipped. - transaction_
keep_ message - What:
The keep message naming one transaction.
Why:
Recovery matches
.keepcontents against it.