git2r icon indicating copy to clipboard operation
git2r copied to clipboard

Methods to list/add/remove hooks

Open hadley opened this issue 9 years ago • 3 comments

Not strictly part of libgit2, but would be nice to have

hadley avatar Apr 28 '15 20:04 hadley

Hooks are not supported by libgit2. However, there is an open PR to add initial support for hooks https://github.com/libgit2/libgit2/pull/3004

stewid avatar May 08 '15 17:05 stewid

Before adding this functionality to git2r, wait and see which API functions libgit2 adds.

stewid avatar May 08 '15 17:05 stewid

The PR referenced above (https://github.com/libgit2/libgit2/pull/3004) got closed with this conclusion: "libgit2 is not going to get hooks as such". So the stuff @hadley's suggesting will not be coming from libgit2.

I ended up here trying to confirm that git2r::commit() does not honour pre-commit hooks. Indeed it does not and now I know why. For the same reason, clients like GitHub for Windows do not honour pre-commit hooks. ¯_(ツ)_/¯.

jennybc avatar Nov 16 '15 22:11 jennybc