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

Function get_head_commit

crates/opencode-util/src/util.rs:235–242  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

233 }
234
235 pub fn get_head_commit(path: &Path) -> Option<String> {
236 let result = run(&["rev-parse", "HEAD"], path);
237 if result.success() {
238 Some(result.stdout.trim().to_string())
239 } else {
240 None
241 }
242 }
243
244 pub fn get_status(path: &Path) -> Vec<String> {
245 let result = run(&["status", "--porcelain"], path);

Callers

nothing calls this directly

Calls 2

runFunction · 0.85
successMethod · 0.45

Tested by

no test coverage detected