technomancy/leiningen — pull request #888 by hyPiRion (2012-12-17 20:36:15+00:00)
Title: Skip git revision in pom if empty git repo. Fixes #887.

Tests if the git ref path exists before slurping the SHA from it. If it does not exist, return `nil` instead of throwing an error. Also remove empty references to the SHA where they may occur.

A question: I'm not sure whether it's considered standard practice to keep the scm tag (`make-git-scm`, line 85-86) even if there's no data in it. This may happen if there's no origin or the origin isn't github, and there are no commits to the repo. Should `make-git-scm` just return `nil` if the scm tag contains no data?

And I forgot to **'str'** the file before slurping it, as seems like the norm within this file. However, since **'slurp'** accept files, this doesn't affect the end result.