pub fn snapshot_worktree(
dest: &Path,
work_tree: &Path,
) -> Result<String, GitError>Expand description
Shallow clone url at reference and check it out into dest. Self-
contained (no shared cache), mirroring git clone --depth 1 --branch <ref>.
Snapshot a dirty working tree into instance-owned space at dest.
Tracked files (including unstaged modifications), plus untracked
non-ignored files, are written as a synthetic commit whose hash is a
pure content address. Gitlinks (submodules) are omitted. If dest
already holds a snapshot at the same content hash, the working tree is
left unchanged.