Skip to main content

apply_private_patch

Function apply_private_patch 

Source
pub fn apply_private_patch(
    input: PrivatePatchInput<'_>,
) -> Result<(), PatchError>
Expand description

What: Validate a policy patch, write it privately, and apply it to the private index. Why: The patch file is created exclusively with private permissions, so a re-run never overwrites an earlier one.

In TS you’d write (pseudocode):

validatePolicyPatch({ patch, expectedRevision });
await runTransactionGit({ args: ['apply', '--cached', '--3way', patchPath], indexPath });