Skip to main content

write_shadow_refs

Function write_shadow_refs 

Source
pub fn write_shadow_refs(
    context: &GitContext,
    cwd: &Path,
    shadow: &Path,
    ref_format: RefFormat,
    target_ref: &str,
    symbolic_head: &SymbolicHead,
    base: &Base,
) -> Result<(), GitFailure>
Expand description

What: Writes the shadow ref store: the snapshot, the symbolic refs, the private target ref and HEAD. Why: The order matches the incumbent’s: symbolic refs come after their targets exist, and HEAD comes last.

In TS you’d write (pseudocode):

await writeShadowRefs({ gitPath, cwd, shadowPath, capture });