6 releases (3 breaking)

0.4.0 Sep 30, 2024
0.3.3 Aug 24, 2024
0.3.1 Dec 15, 2023
0.2.0 Dec 7, 2023
0.1.0 Dec 7, 2023

#970 in Development tools

Download history 341/week @ 2024-07-24 708/week @ 2024-07-31 432/week @ 2024-08-07 441/week @ 2024-08-14 748/week @ 2024-08-21 635/week @ 2024-08-28 765/week @ 2024-09-04 611/week @ 2024-09-11 466/week @ 2024-09-18 672/week @ 2024-09-25 634/week @ 2024-10-02 670/week @ 2024-10-09 698/week @ 2024-10-16 908/week @ 2024-10-23 756/week @ 2024-10-30 701/week @ 2024-11-06

3,171 downloads per month
Used in 2 crates (via asyncgit)

MIT license

22KB
634 lines

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

lib.rs:

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)

Dependencies

~11MB
~249K SLoC