Skip to main content

Module pack_keep

Module pack_keep 

Source
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 .keep of one migrated pack. Why: removePackKeep: after ref-updated.json, and after a failed compare-and-swap.
remove_transaction_keeps
What: Remove every .keep whose message names the transaction; returns how many. Why: removeTransactionKeeps: a .keep holds 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 .keep contents against it.