App-GitGerrit
view release on metacpan or search on metacpan
lib/App/GitGerrit.pm view on Meta::CPAN
my $hooks_dir = File::Spec->catdir($git_dir, 'hooks');
mkdir $hooks_dir unless -e $hooks_dir;
# Try to download and install the hook.
eval { require LWP::Simple };
if ($@) {
info "Cannot install $commit_msg hook because you don't have LWP::Simple installed";
} else {
info "Installing $commit_msg hook";
if (LWP::Simple::is_success(LWP::Simple::getstore(config('baseurl') . "/tools/hooks/commit-msg", $commit_msg))) {
chmod 0755, $commit_msg;
}
}
}
# The credential_* routines below use the git-credential command to
# get and set credentials for git commands and also for Gerrit REST
# interactions.
sub url_userinfo {
my ($url) = @_;
( run in 0.397 second using v1.01-cache-2.11-cpan-496ff517765 )