git-review/git_review
Florian Haas c40eb491e6 Support the Git "core.hooksPath" option when dealing with hook scripts
Previously, git-review would assume that the Git repository's hook
directory is .git/hooks, relative to the root of the checkout. This
assumption breaks if the user has set the core.hooksPath option on the
repository (or, for that matter, in ~/.gitconfig or /etc/gitconfig).

core.hooksPath can either be set to an absolute path, in which case it
is to be interpreted as-is, or to a relative path, in which case it
should be interpreted as relative to the root of the checkout.

Introduce a new convenience function to suss out the correct path, and
use it in places where the reference to .git/hooks was previously
hard-coded.

Reference:
https: //git-scm.com/docs/git-config#Documentation/git-config.txt-corehooksPath

Depends-on: I0f0f44e57a100420d8e6d2eaec7dbb5d77b654af
Change-Id: Id8a3ac464ff75e6d8207f198089f018cc790eca5
2021-06-21 16:24:11 +02:00
..
tests Support the Git "core.hooksPath" option when dealing with hook scripts 2021-06-21 16:24:11 +02:00
__init__.py Migrate to pbr. 2013-08-15 20:42:37 +00:00
cmd.py Support the Git "core.hooksPath" option when dealing with hook scripts 2021-06-21 16:24:11 +02:00