karenetheridge/Dist-Zilla-Plugin-Git-Contributors — pull request #1 by kentfredric (2014-08-12 09:47:05+00:00)
Title: Test and Fix for `git config user.name` bailing if it doesn't exist.

Having a git configuration is not *necessary* for testing a bundle, or indeed, testing anything that uses a bundle.

Without this patch, it is likely that somebody who has never committed with git may check out a repository using `Git::Contributors` + `include_releaser => 0 `, and then be confronted with a confusing explosion when doing `dzil build` on it. ( due to there being no git.user in a git repository natively, and no git.user in ~/ due to having never configured it )

This patch simply avoids the problem by running relevant code in a `try { }` block, and if it fails assuming there is no releaser.

Needs subsequent changes to the place that consumes that return value, as it is not presently suited for it being `undef` , and warns due to doing `$_ eq undef`.

Tests of course lengthy and complicated, as to test this requires fabricating a fake `$ENV{HOME}` with an unconfigured git, and forging a bunch of commits without git configured ( to simulate a clone ).