Skip to main content

execute

Function execute 

Source
pub fn execute(
    root: &Path,
    plan: &SyncPlan,
    options: &SyncOptions,
    cache_bases_dir: &Path,
) -> Result<ApplyResult, MarsError>
Expand description

Execute the sync plan, applying changes to disk.

For each action:

  • Install: copy source content to dest (atomic_write or atomic_install_dir)
  • Overwrite: replace existing with new source content
  • Merge: three-way merge using base from cache
  • Remove: delete file/dir from disk
  • Skip/KeepLocal: record as no-op

Returns outcomes with both source_checksum and installed_checksum. The installed_checksum may differ from source_checksum when frontmatter rewriting occurred.