isaacs/read-package-json — pull request #12 by mfncooper (2012-12-16 00:25:36+00:00)
Title: Check for error before adding Git head sha.

If a new Git repo has been initialised but not yet committed to, there's no file containing the latest commit hash. Check that we actually got a hash before trying to add it to the data. This fixes isaacs/npm#3002.