Skip to main content

Module conclusion_copy

Module conclusion_copy 

Source
Expand description

The shadow conclusion copies at preparation. What: The merge, cherry-pick and revert conclusion state copied into the shadow at preparation, and into the transaction’s comparison copies. Why: Native git commit in the shadow reads the conclusion state the real worktree holds at invocation. Landing later compares the real entries with these copies, so an entry changed by another command after invocation is kept (conclusion_cleanup.rs holds the landing side). Pseudorefs of a reftable repository live in the ref store and are copied with update-ref (src/shadow-repository/shadow-conclusion-state.ts).

In TS you’d write (pseudocode):

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

Functions§

copy_conclusion_state
What: Copies every present conclusion entry of the owning worktree into the shadow and the transaction. Why: The shadow copy is what native commit reads; the transaction copy is what landing compares against.