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
Sparse Checkout #6394
Open
YuKitsune
wants to merge
56
commits into
libgit2:main
Choose a base branch
from
YuKitsune:features/sparse-checkout
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sparse Checkout #6394
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
…ile diffing Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
…used by sparse checkout code as well Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
The sparse-checkout file is treated as a git_attr_file. A public API git_sparse_check_path reads the sparse-checkout file from the attribute file cache and checks the path against this attribute file using the gitignore ruleset Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
…ed git_sparse object Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
…es that are excluded by the sparse checkout ruleset - if sparse checkout is enabled Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
…arse Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
…accessed by checkout and diff functionalities quickly. Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
…heckout Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
…ries Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
Signed-off-by: Jochen Hunz <j.hunz@anchorpoint.app>
- Temporarily remove cone references, will need to revisit - Updating references in tests
seems we've run out of space on that enum...
YuKitsune
force-pushed
the
features/sparse-checkout
branch
from
January 25, 2023 04:23
6958e3f
to
4224906
Compare
VinnyOG
pushed a commit
to 8thwall/libgit2
that referenced
this pull request
Jan 31, 2023
VinnyOG
pushed a commit
to 8thwall/libgit2
that referenced
this pull request
Mar 8, 2023
This PR seems really promising with lots of people wanting sparse-checkout support. Not just directly from the libgit2 community (#2263), but also from all of the other projects that are built with libgit2. Are there any particular blockers for merging this? The last update seems to be from 8 months ago. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 implement basic sparse checkout functionality into LibGit2 building on @jochenhz's original PR.
What does it do?
sparse-checkout
file is treated as anattr_file
, hence followinggitignore
rulescore.sparseCheckout
init
,set
,add
,reapply
anddisable
commands all supportedgit_sparse_check_path
to query whether or not a file is excluded from checkoutGIT_INDEX_ENTRY_SKIP_WORKTREE
flag ongit_index_read_tree
based on the sparse checkout ruleset.What does it not do?
core.sparseCheckoutCone
GIT_CHECKOUT_NONE
andgit_index_read_tree
)Note