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

Function find_hooks_dir

atomic-cli/src/commands/git/hooks.rs:82–89  ·  view source on GitHub ↗

Find the .git/hooks directory.

()

Source from the content-addressed store, hash-verified

80
81/// Find the .git/hooks directory.
82fn find_hooks_dir() -> CliResult<PathBuf> {
83 let git_repo = git2::Repository::discover(".").map_err(|_| CliError::GitError {
84 message: "Not a git repository".to_string(),
85 })?;
86 let git_dir = git_repo.path(); // .git/
87 let hooks_dir = git_dir.join("hooks");
88 Ok(hooks_dir)
89}
90
91/// Install hooks into .git/hooks/.
92fn install_hooks() -> CliResult<()> {

Callers 3

install_hooksFunction · 0.85
uninstall_hooksFunction · 0.85
show_statusFunction · 0.85

Calls 1

pathMethod · 0.45

Tested by

no test coverage detected