MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / head_is_detached

Method head_is_detached

atomic-cli/tests/it/agent_git_commit_absorb_test.rs:161–169  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

159 }
160
161 fn head_is_detached(&self) -> bool {
162 !self
163 .with_env(Command::new("git"))
164 .args(["symbolic-ref", "-q", "HEAD"])
165 .output()
166 .unwrap()
167 .status
168 .success()
169 }
170
171 fn view_ref(&self, view: &str) -> String {
172 self.git(&["rev-parse", &format!("refs/atomic/views/{view}")])

Callers

nothing calls this directly

Calls 4

successMethod · 0.80
with_envMethod · 0.80
unwrapMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected