7 releases (4 breaking)

0.5.0 May 26, 2025
0.4.0 Sep 30, 2024
0.3.3 Aug 24, 2024
0.3.1 Dec 15, 2023
0.1.0 Dec 7, 2023

#415 in Filesystem

Download history 556/week @ 2025-02-23 480/week @ 2025-03-02 634/week @ 2025-03-09 585/week @ 2025-03-16 610/week @ 2025-03-23 625/week @ 2025-03-30 650/week @ 2025-04-06 437/week @ 2025-04-13 419/week @ 2025-04-20 519/week @ 2025-04-27 514/week @ 2025-05-04 574/week @ 2025-05-11 674/week @ 2025-05-18 966/week @ 2025-05-25 950/week @ 2025-06-01 601/week @ 2025-06-08

3,222 downloads per month
Used in 5 crates (3 directly)

MIT license

25KB
727 lines

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

~10–18MB
~303K SLoC