## Summary
This takes a smaller approach than #1673.
Instead of mutating Git config during install, it lets `prek` ask Git
for the effective hooks directory and:
- honors repo-local (`git config --local`) `core.hooksPath`
- honors worktree-local (`git config --worktree`) `core.hooksPath`
- continues to refuse global/system `core.hooksPath` by default
- aligns `prek uninstall` with the same behavior
- updates the CLI reference and FAQ to document the behavior
This keeps the existing safety boundary for externally configured hook
locations while making linked worktrees and repo-owned hook directories
work without extra wrapper logic.
## Testing
- `cargo test -p prek --test install`
- `PREK_GENERATE=1 cargo test --bin prek
cli::_gen::generate_cli_reference -- --exact`
## Context
Closes#1672Closes#1673
---------
Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
This renames the hook environment setup surface from `install-hooks` to
`prepare-hooks` to make the distinction between two different actions
clearer:
- `prek install` installs Git hook shims under .git/hooks
- `prek prepare-hooks` prepares the managed hook environments and caches
The old naming used "install" for both concepts, which was easy to
misread, especially in forms like `prek install --install-hooks`. The
new names make the behavior more explicit:
- prek install --prepare-hooks
- prek prepare-hooks
Compatibility is preserved, so existing workflows continue to work.
Closes#1762
When a repo clone fails because authentication is required, retry that
clone with `GIT_TERMINAL_PROMPT=1` so Git can prompt the user for
credentials.
The retry flow keeps the initial clone pass non-interactive, detects
auth-related failures, and then retries only those failed clones with
terminal prompts enabled. Retries run sequentially so users only see one
credential prompt at a time and know which repository is requesting
authentication.
Closes#1634Closes#1173
Related #1193
Related #1472