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

20 Commits

Author SHA1 Message Date
Jo 442d88d7d7 Use relative path with --cd in the generated hook script (#868)
* Use relative path with `--cd` in generated hook script

Use a relative path with `--cd` in the generated hook script to avoid switching to the original worktree.

Also, unset `GIT_DIR` in the hook script so git doesn’t treat the current directory (after the cd) as the git root.

* Fix snapshots

* Add tests
2025-10-13 21:42:02 +08:00
Jo 7ccee511f1 Add fallback mechanism for prek executable in git hooks (#850)
* Add fallback mechanism for prek executable in git hooks

* Fix
2025-10-08 02:52:09 +08:00
Jo 7a17c4b677 Improve install message when installing for a sub-project (#847)
* Improve install message when installing for a sub-project

* Fix tests
2025-10-07 16:47:42 +08:00
Jo 736768b4f6 Support selectors in prek install/install-hooks/hook-impl (#683)
* .

* Support selectors in `prek install`

* Support `prek install-hooks` too

* Add tests
2025-09-09 23:39:41 +08:00
Jo bc1b423a94 Bring back .pre-commit-config.yml support (#676)
* Bring back `.pre-commit-config.yml` support

* Fix snaps
2025-09-08 19:39:46 +08:00
Jo 4cb4f7ca54 Add a warning to hook-impl when the script needs reinstall (#647)
* Add a warning to `hook-impl` when the script needs reinstall

* add hook type

* update snaps
2025-09-07 20:35:52 +08:00
Jo 055e493fac Support prek install|install-hooks|hook-impl|init-template-dir in workspace mode (#595)
* Support `prek install|install-hooks|hook-impl|init-template-dir` in workspace mode

* Fix

* Fix windows
# Conflicts:
#	src/cli/hook_impl.rs
#	tests/hook_impl.rs

# Conflicts:
#	src/cli/install.rs
2025-09-06 16:44:22 +08:00
Jo 3f1f9e1056 Various fixes to init-templdate-dir and directory related bug (#484)
* various fixes

* Fix tests

* Fix
2025-08-18 14:30:18 +08:00
Jo 23f865819a Rename project to prek from prefligit (#402) 2025-08-08 23:12:20 +08:00
Jo 6c205b2270 Add asserts to tests (#283)
* Add asserts to tests

* Fix

* Debug

* Use a old python 3.12 that github action does not installed
2025-08-01 02:09:52 +08:00
Jo 1c034a1afb Ignore config not staged error for config outside the repo (#270)
* Use `sync_all` over `flush`

* Ignore config not staged for config outside the repo

* improve test
2025-07-29 09:56:09 +08:00
Jo ec28f449cc Implement install-hooks (#258)
* Implement `install-hooks`

* Add tests
2025-07-28 13:33:24 +08:00
Jo 0f8704d6f8 Upgrade to Rust 2024 edition (#196) 2025-02-21 17:56:12 +08:00
Jo 8dfb3101ff Rename project name to prefligit (#118)
* Rename project to `prefligit`

* Bump to 0.0.6

* Fix tests

* Add a rename note
2024-12-03 13:20:00 +08:00
xmchx 81455fbf5c feat: support pre-commit init-templatedir (#101)
* feat: support init-templatedir

* chore: update

* Fix and add test

---------

Co-authored-by: j178 <10510431+j178@users.noreply.github.com>
2024-11-23 01:18:30 +08:00
Jo 478ab2c5eb Fix pre-commit intall --hook-type name (#102)
* Fix `pre-commit intall --hook-type` name

* Fix test

* Add a test
2024-11-22 17:38:15 +08:00
Jo 51448afc3b Use local hook in tests (#86) 2024-11-21 11:45:41 +08:00
Jo 4f1b8c9b9b Skip empty config argument (#64)
* Skip empty config argument

* fix clippy
2024-11-14 18:11:58 +08:00
Jo 93a9fddea8 Implement pre-commit uninstall (#36)
* Implement `pre-commit uninstall`

* Add tests
2024-11-11 20:32:44 +08:00
Jo 0399d08dca Implement pre-commit install (#28)
* Implement `pre-commit install`

* Improve script

* Add tests

* fix test

* debug windows

* fix
2024-11-11 20:28:30 +08:00