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:
-rwxr-xr-xgit-send-email.perl3
-rw-r--r--perl/Git.pm12
2 files changed, 2 insertions, 13 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 175da07d94..a454020f01 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1949,7 +1949,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) {
diff --git a/perl/Git.pm b/perl/Git.pm
index df6280ebab..02eacef0c2 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -619,18 +619,6 @@ Return path to the git repository. Must be called on a repository instance.
sub repo_path { $_[0]->{opts}->{Repository} }
-=item hooks_path ()
-
-Return path to the hooks directory. Must be called on a repository instance.
-
-=cut
-
-sub hooks_path {
- my ($self) = @_;
-
- my $dir = $self->command_oneline('rev-parse', '--git-path', 'hooks');
- return $dir;
-}
=item wc_path ()