Skip git revision in pom if empty git repo. Fixes #887. #888

Merged
merged 1 commit into from Dec 17, 2012

Projects

None yet

2 participants

@hyPiRion
Collaborator

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. As such, fixes #887 .

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.

@hyPiRion hyPiRion Skip git revision in pom.xml if empty git repo.
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.
23da925
@technomancy
Owner

Top-notch; thanks for this.

@technomancy technomancy merged commit d736a52 into technomancy:master Dec 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment