Skip to main content

Module conclusion_cleanup

Module conclusion_cleanup 

Source
Expand description

Native conclusion cleanup reproduced in the owning worktree. What: Native conclusion cleanup reproduced in the owning worktree’s Git directory after a merge, cherry-pick or revert conclusion lands, and the names of that state. Why: Native git commit removes MERGE_HEAD and its siblings in the shadow; the real worktree must end the same way, but an entry is removed only while it still holds the bytes or value copied at preparation, because a changed entry belongs to a later command (src/shadow-repository/shadow-conclusion-cleanup.ts, -files.ts, -names.ts).

In TS you’d write (pseudocode):

await reproduceConclusionCleanup({ gitPath, cwd, gitDir, shadowPath, transactionDirectory, refFormat });

Constants§

CONCLUSION_COPY_DIRECTORY
Private directory of the transaction holding the preparation-time copies.
CONCLUSION_STATE_FILES
Conclusion state files copied into the shadow at preparation.
REMOVED_CONCLUSION_FILES
Entries landing removes from the owning worktree when native Git removed them in the shadow.
SEQUENCER_DIRECTORY
Conclusion state directory copied into the shadow at preparation.
STORE_HELD_PSEUDOREFS
Pseudorefs a reftable repository keeps in its ref store rather than as files.
STORE_RECORD_FILENAME
Record of the store-held pseudoref values copied at preparation.

Functions§

is_store_held
What: Whether an entry lives in the ref store under this backend. Why: isStoreHeld: reftable keeps three pseudorefs in the store.
reproduce_conclusion_cleanup
What: Reproduce native conclusion cleanup in the owning worktree’s Git directory. Why: reproduceConclusionCleanup: removed entries, MERGE_RR copied back, ORIG_HEAD kept, and sequencer/ removed only when native Git removed the shadow copy.
resolve_pseudoref
What: Resolve a pseudoref with git rev-parse --verify --quiet, or nothing when absent. Why: resolvePseudoref.
same_tree
What: Whether two directory trees hold the same regular files with the same bytes, and are not empty. Why: sameTree: the sequencer is removed only while it is exactly the copied state.