Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PDK-461) Make Version.git_ref more forgiving #281

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

DavidS
Copy link
Contributor

@DavidS DavidS commented Sep 1, 2017

When there is no target .git directory, no need to call git at all.

Also adds more tests to cover everything.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 93.84% when pulling 9210a1c on DavidS:pdk-461-better-version into 3ef0637 on puppetlabs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 93.84% when pulling 95b6d0c on DavidS:pdk-461-better-version into 3ef0637 on puppetlabs:master.


ref_result[:stdout].strip if ref_result[:exit_code].zero?
return '' unless File.directory?(source_git_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we return nil here instead of an empty string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

When there is no target `.git` directory, no need to call git at all.

Also adds more tests to cover everything.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 93.988% when pulling 34ab82e on DavidS:pdk-461-better-version into 1d6e2bc on puppetlabs:master.

@rodjek rodjek merged commit ff57c56 into puppetlabs:master Sep 6, 2017
@DavidS DavidS deleted the pdk-461-better-version branch January 17, 2018 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants