Merge branch 'ab/send-email-inline-hooks-path'

Code simplification.

* ab/send-email-inline-hooks-path:
  send-email: move "hooks_path" invocation to git-send-email.perl
  send-email: don't needlessly abs_path() the core.hooksPath
This commit is contained in:
Junio C Hamano
2021-05-27 12:36:57 +09:00
3 changed files with 6 additions and 17 deletions

View File

@ -1959,7 +1959,8 @@ sub validate_patch {
my ($fn, $xfer_encoding) = @_;
if ($repo) {
my $validate_hook = catfile($repo->hooks_path(),
my $hooks_path = $repo->command_oneline('rev-parse', '--git-path', 'hooks');
my $validate_hook = catfile($hooks_path,
'sendemail-validate');
my $hook_error;
if (-x $validate_hook) {