MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / track

Method track

crates/opencode-session/src/snapshot.rs:20–25  ·  view source on GitHub ↗
(directory: &Path)

Source from the content-addressed store, hash-verified

18 }
19
20 pub fn track(directory: &Path) -> Result<String> {
21 let git_dir = ensure_snapshot_repo(directory)?;
22 git_add_all(directory, &git_dir)?;
23 let output = git_output(directory, &git_dir, &["write-tree"])?;
24 Ok(String::from_utf8_lossy(&output.stdout).trim().to_string())
25 }
26
27 pub fn revert(directory: &Path, patches: Vec<SnapshotPatch>) -> Result<()> {
28 let git_dir = ensure_snapshot_repo(directory)?;

Callers

nothing calls this directly

Calls 3

ensure_snapshot_repoFunction · 0.85
git_add_allFunction · 0.85
git_outputFunction · 0.70

Tested by

no test coverage detected