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

Method hooks_installed

atomic-cli/tests/it/git_shim_opt_in_test.rs:107–119  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

105 }
106
107 fn hooks_installed(&self) -> Vec<String> {
108 let mut hooks: Vec<String> = fs::read_dir(self.root().join(".git/hooks"))
109 .map(|entries| {
110 entries
111 .filter_map(Result::ok)
112 .map(|entry| entry.file_name().to_string_lossy().into_owned())
113 .filter(|name| !name.ends_with(".sample"))
114 .collect()
115 })
116 .unwrap_or_default();
117 hooks.sort();
118 hooks
119 }
120
121 /// Run one OpenCode agent hook dispatch the way the atomic-opencode
122 /// plugin does: JSON on stdin, foreground, from the repository root.

Callers

nothing calls this directly

Calls 4

sortMethod · 0.80
rootMethod · 0.45
collectMethod · 0.45
file_nameMethod · 0.45

Tested by

no test coverage detected