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

Function get_status

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

Source from the content-addressed store, hash-verified

242 }
243
244 pub fn get_status(path: &Path) -> Vec<String> {
245 let result = run(&["status", "--porcelain"], path);
246 if result.success() {
247 result.stdout.lines().map(|s| s.to_string()).collect()
248 } else {
249 Vec::new()
250 }
251 }
252
253 pub fn has_uncommitted_changes(path: &Path) -> bool {
254 !get_status(path).is_empty()

Callers 1

has_uncommitted_changesFunction · 0.85

Calls 3

runFunction · 0.85
newFunction · 0.85
successMethod · 0.45

Tested by

no test coverage detected