summaryrefslogtreecommitdiff
path: root/perl/Git.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl/Git.pm')
-rw-r--r--perl/Git.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/perl/Git.pm b/perl/Git.pm
index 02eacef0c2..73ebbf80cc 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -619,6 +619,19 @@ 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');
+ my $abs = abs_path($dir);
+ return $abs;
+}
=item wc_path ()