-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for partial checkout filters #1396
Add support for partial checkout filters #1396
Conversation
bump +1 this would be nice to use with Yarn |
i've used this fork/branch successfully with both |
I think It would be almost exactly as small, but without breaking the Git history. |
CLONE_FILTER=$(git config --local --get remote.origin.partialclonefilter) | ||
|
||
if [ "$CLONE_FILTER" != "blob:none" ]; then | ||
echo "Expected ./fetch-filter/.git/config to have 'remote.origin.partialclonefilter' set to 'blob:none'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you miss exit 1 here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, good spot 😳
This is exactly what we need in our repo. Speeds up checkout by a factor of 4 without breaking git history so our existing logic that uses |
Thanks for your contribution. Do you mind adding an update to https://github.com/actions/checkout/blob/72f2cec99f417b1a1c5e2e88945068983b7965f9/action.yml#L56C19-L60 with the new setting with a note that it will override the The rest LGTM. |
Will take a look as to whats causing the test to fail soon... |
@cory-miller the test actions should pass now 🙏 |
Thanks for working on this! I will build a release soon. |
|
@finleygn thanks for working on this! @cory-miller the issues #172, #663, and #1152 should likely be closed. |
This does not seem to apply to submodules. |
This is a cool feature, but please don't make the default checkout larger for everyone since most users don't need the Git history in their CI pipelines. We do often need the history, so we tried switching from |
I think there's something missing from the docs here; you still need to explicitly set - use: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none Without setting it, you still only get the most recent commit. For the TypeScript repo:
For example, https://github.com/microsoft/TypeScript/actions/runs/6359689867/job/17272959471?pr=55923 (though this link will eventually break) |
@jakebailey, did you mean |
Yes, that's just a typo on my part. |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://github.com/actions/checkout) | action | major | `v3` -> `v4` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v4`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v410) [Compare Source](actions/checkout@v3...v4) - [Add support for partial checkout filters](actions/checkout#1396) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS43IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNyIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9--> Reviewed-on: https://git.apud.pl/jacek/adventofcode/pulls/38 Co-authored-by: Renovate <renovate@apud.pl> Co-committed-by: Renovate <renovate@apud.pl>
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://github.com/actions/checkout) | action | major | `v3` -> `v4` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v4`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v410) [Compare Source](actions/checkout@v3...v4) - [Add support for partial checkout filters](actions/checkout#1396) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNDEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE0MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Reviewed-on: https://gitea.int.magicalinternetbox.net/joel/rhel-wireguard/pulls/10 Co-authored-by: Renovate Bot <renovatebot-gitea@talktojoel.me> Co-committed-by: Renovate Bot <renovatebot-gitea@talktojoel.me>
A change to add support for sparse checkouts has been added recently (#1369). This extends upon that to allow support for other filters, and the ability to filter without a sparse checkout.
Inspired by this blog post -> https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone