]> git.ipfire.org Git - thirdparty/git.git/blobdiff - perl/Git.pm
Merge branch 'en/ort-perf-batch-9'
[thirdparty/git.git] / perl / Git.pm
index 02eacef0c2a4a43058a74dda4cebe1ae16bdd2eb..73ebbf80cc6f42cff20acdb6f1d94bc03f28e71f 100644 (file)
@@ -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 ()