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_RRcopied back,ORIG_HEADkept, andsequencer/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.