1
0
mirror of https://github.com/j178/prek.git synced 2026-04-25 02:11:36 +02:00
Commit Graph

9 Commits

Author SHA1 Message Date
Jo 78d0a438db docs: explain prek name (#1980)
For#1978.
2026-04-22 00:13:36 +08:00
Sadjow Leão dc98c4792d Honor repo and worktree core.hooksPath (#1892)
## 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 #1672
Closes #1673

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2026-04-13 17:11:44 +08:00
Jo 4ed4e8660a Disambiguate “hook” terminology by renaming "Git hooks" to "Git shims" (#1776)
Closes #1775
2026-03-11 11:46:52 +08:00
Jo 9009dc0fd8 Rename prek install-hooks to prek prepare-hooks, prek install --install-hooks to prek install --prepare-hooks (#1766)
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
2026-03-10 13:06:01 +08:00
Jo 6d07a0e112 Retry auth-failed repo clones with terminal prompts enabled (#1761)
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 #1634
Closes #1173
Related #1193
Related #1472
2026-03-09 23:03:53 +08:00
Jo 60eb3f47e7 Document that use --refresh to pick up .prekignore changes (#1575)
For https://github.com/j178/prek/issues/1522#issuecomment-3853425122
2026-02-05 21:24:31 +08:00
Shaan Majid f0d96ec853 Allow GIT_CONFIG_PARAMETERS for private repository authentication (#1472) 2026-01-28 08:35:52 +08:00
jmm 5400299a4d Add pronounciation entry to FAQ. (#1442) 2026-01-22 00:00:44 +08:00
Jo 1bb181ffa3 Add a FAQ page explaning prek install --install--hooks (#1162) 2025-11-29 19:52:52 +08:00