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

#1184 in Development tools

Download history 503/week @ 2024-11-24 642/week @ 2024-12-01 607/week @ 2024-12-08 339/week @ 2024-12-15 178/week @ 2024-12-22 200/week @ 2024-12-29 369/week @ 2025-01-05 964/week @ 2025-01-12 706/week @ 2025-01-19 521/week @ 2025-01-26 586/week @ 2025-02-02 504/week @ 2025-02-09 518/week @ 2025-02-16 556/week @ 2025-02-23 480/week @ 2025-03-02 581/week @ 2025-03-09

2,190 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
~252K SLoC