9 releases (breaking)

0.7.0 Mar 21, 2026
0.6.0 Dec 14, 2025
0.5.0 May 26, 2025
0.4.0 Sep 30, 2024
0.1.0 Dec 7, 2023

#123 in Testing

Download history 918/week @ 2025-12-21 938/week @ 2025-12-28 1310/week @ 2026-01-04 1684/week @ 2026-01-11 2328/week @ 2026-01-18 1910/week @ 2026-01-25 2073/week @ 2026-02-01 882/week @ 2026-02-08 1846/week @ 2026-02-15 2200/week @ 2026-02-22 2085/week @ 2026-03-01 3285/week @ 2026-03-08 3433/week @ 2026-03-15 2849/week @ 2026-03-22 2502/week @ 2026-03-29 2694/week @ 2026-04-05

11,874 downloads per month
Used in 5 crates (2 directly)

MIT license

39KB
1K SLoC

git2-rs addon supporting git hooks

we look for hooks in the following locations:

  • whatever config.hooksPath points to
  • .git/hooks/
  • whatever list of paths provided as other_paths (in order)

most basic hook is: hooks_pre_commit. see also other hooks_* functions.

create_hook is useful to create git hooks from code (unittest make heavy usage of it)


git2-hooks

adds git hook functionality on top of git2-rs

todo

  • unittest coverage symlinks from .git/hooks/<hook> -> X
  • unittest coverage ~ expansion inside core.hooksPath

Dependencies

~12MB
~267K SLoC