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

Merged
merged 1 commit into from Dec 17, 2012

Conversation

2 participants
@hypirion
Collaborator

hypirion commented Dec 17, 2012

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.

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.
@technomancy

This comment has been minimized.

Show comment Hide comment
@technomancy

technomancy Dec 17, 2012

Owner

Top-notch; thanks for this.

Owner

technomancy commented Dec 17, 2012

Top-notch; thanks for this.

technomancy added a commit that referenced this pull request Dec 17, 2012

Merge pull request #888 from hyPiRion/skip-pom-git-revision-if-empty-…
…git-repo

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

@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