Skip to content

Improve Git performance when using SHA revisions #380

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

Merged
merged 3 commits into from
Jun 19, 2018

Conversation

vpierson
Copy link

When using a SHA revision, a git fetch does not need to be done if the current HEAD is already pointing to the requested SHA.

vpierson added 3 commits June 18, 2018 11:42
This change separates testing of sha and refs in the revisions and only
uses the values "*sha" when a sha is intented.
If you're using a sha as your revision parameter and the current HEAD is
already pointing at that sha, there's no need to do a git fetch.

Making this change should significantly reduce the number of calls made
to the remote Git server; since the catalog hasn't changed, you'll be
up-to-date and not do the fetch call.
@david22swan
Copy link
Member

david22swan commented Jun 19, 2018

@david22swan
Copy link
Member

Passed on adhoc

@david22swan david22swan merged commit 1fd1f51 into puppetlabs:master Jun 19, 2018
@pmcmaw pmcmaw added the bugfix label Sep 20, 2018
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.

3 participants