Fix treatment of close pipe exit value

I was treating the result of 'close' the same way as the result of
'system' but this is wrong. Close returns a boolean value while system
returns $?.

This problem was reported to me by Marcelo Bissaro.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Add missing dependency

The sub Git::Hooks::grok_groups invokes read_file but the module
wasn't being use'd before.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Fix commit grokking on pushing a new branch

The Git::More::get_commits method was invoking git-rev-list with wrong
arguments when it got a null SHA-1 as $old_commit. This is a know
problem discussed, eg, at http://stackoverflow.com/questions/4523668.

Now, in this situation it knows how to prepare a suitable argument
list for git-rev-list.

This bug was reported by Marcelo Bissaro.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Fix commit grokking on deleting a branch

The Git::More::get_commits method was invoking git-rev-list with wrong
arguments when it got a null SHA-1 as $new_commit, which happens when
one pushes to delete a remote branch.

Now, in this situation it returns an empty list, meaning that no new
commit has been pushed.

This bug was reported by Marcelo Bissaro.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Make PerlCritic excuse some violations

These are a few violations that aren't really bad.

Also, make the output of 'tidyall' be verbose.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Refactor: simple optimization

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
Fix Git::More::is_ref_enabled for when in dettached head state

This method wasn't expecting an undefined ref, but it could happen if
the repo is in the dettached head state. Now, in this situation, it
returns true, meaning that non-refs are enabled by default.

This required a fix to CheckJira also.

Signed-off-by: Gustavo L. de M. Chaves <gnustavo@cpan.org>
v0.039

  [New features]
  - run_hook doesn't die at the first error anymore. Now it collects
    errors from all hooks to be able to show them all when it dies at
    the end. These modification required changes to all plugins to
    make them invoke an error method instead of simply dying.

  [Changes]
  - Git::More::get_current_branch previously returned the branch
    short-name. Now it returns the branch full name. Moreover, when in
    dettached mode it returns undef.

  [Fixes]
  - The exit code of external pre-receive hooks weren't being dealt
    with correctly.

  - The arguments for update and pre-receive hooks weren't being dealt
    with correctly when new branches were being pushed or branches
    were being deteled on a push.

  - Fix Git::More::is_ref_enabled for when in dettached head state. It
    returns true in this case.

  [Cleanup]
  - Fix all L<> POD tags in the documentation.