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

Function github_detect_dirty

crates/opencode-cli/src/main.rs:4940–4948  ·  view source on GitHub ↗
(original_head: &str)

Source from the content-addressed store, hash-verified

4938}
4939
4940fn github_detect_dirty(original_head: &str) -> anyhow::Result<(bool, bool)> {
4941 let status = git_output(&["status", "--porcelain"])?;
4942 let has_uncommitted_changes = !status.trim().is_empty();
4943 if has_uncommitted_changes {
4944 return Ok((true, true));
4945 }
4946 let current_head = git_output(&["rev-parse", "HEAD"])?;
4947 Ok((current_head.trim() != original_head.trim(), false))
4948}
4949
4950fn github_commit_all(
4951 summary: &str,

Callers

nothing calls this directly

Calls 2

is_emptyMethod · 0.80
git_outputFunction · 0.70

Tested by

no test coverage detected