Closed autarch closed 7 years ago
I feel your pain too. ;-)
I never thought about incorporating part of Git in Git::Hooks but some time ago I evaluated other Git wrapper packages available at CPAN and decided that it would be best to substitute Git::Repository for Git. It seems to be well maintained and featureful.
Do you know it? What do you think of this?
Using Git::Repository
sounds like a great idea!
Great. Thanks.
I'll leave on vacations next month and I intend to have some fun with Git::Hooks by implementing a few of the things that are in my to do list. I'll try to do it then. Please, hold on! :)
I've released a TRIAL version 2.0.0 of Git::Hooks. It uses Git::Repository now. I'll wait for the first CPANTesters reports before doing a final release.
Here's the problem I encountered ...
The git package include a version of
Git.pm
that it uses to implement some commands, notablygit add -p
. This module ends up at/usr/share/perl5/Git.pm
.I'm not using system Perl for local dev, however, so the
perl
in my path is not/usr/bin/perl
, and my perlbrewedperl
does not include/usr/share/perl5
in@INC
.This means that if I install
Git::Hooks
, it ends up pulling in the CPAN version ofGit.pm
. Unfortunately, that version seems to breakgit add -p
.I think this is because the CPAN
Git.pm
is simply not keeping up to date with the one shipped with the Git core.But I suspect even if the CPAN version were kept up to date there might be an opposite problem where installing the CPAN version breaks the core git commands because the CPAN version is newer than the one that the local
git
expects.I think the easiest option would be to simply copy the portion of Git.pm that you need into your distro so you do not depend on code that is distributed outside the normal Perl module distro mechanism.