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

ci(workflow): Hasten checkout with blobless clones #693

Closed
wants to merge 1 commit into from

Conversation

Kurt-von-Laven
Copy link
Contributor

@Kurt-von-Laven Kurt-von-Laven commented Sep 29, 2023

In v4.1.0, actions/checkout recently introduced support for Git's partial clones. Partial clones are smaller than full clones (fetch-depth: 0), because they don't clone historical blobs and/or trees. Partial clones do clone all historical commits and tags though, so they are larger than depth 1 shallow clones, the default when fetch-depth isn't specified. In partial clones, unlike shallow clones, Git operations will typically fetch data that isn't available locally as needed. Hence, prefer blobless clones, the partial clones that give the best performance overall, to full clones, but continue using shallow clones when historical commits and tags aren't needed (e.g., by Commitizen).

@Kurt-von-Laven Kurt-von-Laven self-assigned this Sep 29, 2023
In v4.1.0, actions/checkout recently introduced support for Git's
partial clones. Partial clones are smaller than full clones
(`fetch-depth: 0`), because they don't clone historical blobs and/or
trees. Partial clones do clone all historical commits and tags though,
so they are larger than depth 1 shallow clones, the default when
`fetch-depth` isn't specified. In partial clones, unlike shallow clones,
Git operations will typically fetch data that isn't available locally as
needed. Hence, prefer blobless clones, the partial clones that give the
best performance overall, to full clones, but continue using shallow
clones when historical commits and tags aren't needed (e.g., by
Commitizen).
@Kurt-von-Laven Kurt-von-Laven changed the title ci(workflow): Hasten checkout with treeless clones ci(workflow): Hasten checkout with blobless clones Sep 29, 2023
@Kurt-von-Laven
Copy link
Contributor Author

I experimented with both treeless and blobless clones, and they increased the runtime of the entire workflow by about 50% and 10%, respectively, so I am closing this pull request.

@Kurt-von-Laven Kurt-von-Laven deleted the workflow branch September 29, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant