App-GitHooks-Plugin-DetectCommitNoVerify

 view release on metacpan or  search on metacpan

lib/App/GitHooks/Plugin/DetectCommitNoVerify.pm  view on Meta::CPAN

			$changes_pass = App::GitHooks::Hook::PreCommit::run_all_tests( $local_app );
		}
	);

	if ( !$changes_pass )
	{
		# "git revert" bypasses the pre-commit hook, so we can only use use the
		# prepare-commit-msg hook to catch any show-stoppers.
		# Since prepare-commit-msg doesn't support --no-verify, we should only
		# perform the essential checks when we're analyzing a revert. Note that you
		# can still do chmod -x .git/hooks/prepare-commit-msg to force-bypass this
		# hook in this case.
		my $staged_changes = $app->get_staged_changes();
		if ( $staged_changes->is_revert() )
		{
			chomp( $stdout );
			print $stdout, "\n";
			print "\n";
			print $app->color( 'red', "Fix the errors above and use 'git commit' to complete the revert." ) . "\n";
			return $PLUGIN_RETURN_FAILED;
		}



( run in 0.248 second using v1.01-cache-2.11-cpan-496ff517765 )