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

Function hook_root

atomic-cli/src/commands/git/shim.rs:767–772  ·  view source on GitHub ↗

The repository root for a `hook-*` entry point, or `None` when Git ran the dispatcher inside a linked worktree and the hook passes through.

(hook_name: &str)

Source from the content-addressed store, hash-verified

765/// The repository root for a `hook-*` entry point, or `None` when Git ran
766/// the dispatcher inside a linked worktree and the hook passes through.
767fn hook_root(hook_name: &str) -> CliResult<Option<PathBuf>> {
768 if linked_worktree::hook_passes_through(hook_name) {
769 return Ok(None);
770 }
771 find_repository_root().map(Some)
772}
773
774fn reconcile() -> CliResult<()> {
775 let root = find_repository_root()?;

Callers 1

runMethod · 0.85

Calls 2

hook_passes_throughFunction · 0.85
find_repository_rootFunction · 0.85

Tested by

no test coverage detected