Skip to main content

diff_commits

Function diff_commits 

Source
pub fn diff_commits<S: ObjectStoreExt>(
    store: &S,
    vault: &KeyVault,
    old_commit: Option<&VoidCid>,
    new_commit: &VoidCid,
) -> Result<TreeDiff>
Expand description

Computes the diff between two commits.

If old_commit is None, all files in new_commit are treated as Added.

§Arguments

  • store - Object store for fetching encrypted objects
  • vault - Key vault for decryption
  • old_commit - CID of the old commit (None for empty tree)
  • new_commit - CID of the new commit

§Returns

A TreeDiff containing all file differences.