Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@linaro.org>2021-03-23 20:33:27 +0300
committerJunio C Hamano <gitster@pobox.com>2021-03-24 01:02:52 +0300
commitc8243933c74e0bebcc617f750ae3990ecca47759 (patch)
treedff66299172f89b05e54680fd18c34d05bd79076 /git-send-email.perl
parent142430338477d9d1bb25be66267225fb58498d92 (diff)
git-send-email: Respect core.hooksPath setting
get-send-email currently makes the assumption that the 'sendemail-validate' hook exists inside of the repository. Since the introduction of 'core.hooksPath' configuration option in 867ad08a261 (hooks: allow customizing where the hook directory is, 2016-05-04), this is no longer true. Instead of assuming a hardcoded repo relative path, query git for the actual path of the hooks directory. Signed-off-by: Robert Foss <robert.foss@linaro.org> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 1f425c0809..f5bbf1647e 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1942,7 +1942,7 @@ sub validate_patch {
my ($fn, $xfer_encoding) = @_;
if ($repo) {
- my $validate_hook = catfile(catdir($repo->repo_path(), 'hooks'),
+ my $validate_hook = catfile($repo->hooks_path(),
'sendemail-validate');
my $hook_error;
if (-x $validate_hook) {