feat: add a sparse-checkout workflow #55286
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to be the most non-intrusive approach to manage getting the files that one needs for working on the platform.
The strategy is as follows:
We have close to 90K files related to curriculum.
A fresh clone, of the repo (before this PR lands) has these stats:
We could instead use
--sparse
and--filter=blob:none
to get only git related information.Now to get the actual files in the filesystem we would do something along the lines of
However doing the above manually is tedious and error prone. Instead this PR adds a bash script to help. There are detailed commands and steps are in the comments in the file.
Critically, downloading the needed directories:
reduces the repos size on the local machine:
and the count of files, for example:
Note
This PR aims to have minimal impact.