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

[SPARSE] sparse-checkout builtin V0 #178

Conversation

derrickstolee
Copy link
Collaborator

This is the "version zero" of the sparse-checkout builtin. This version is preliminary, and will eventually be replaced by something that can be sent upstream. This is being merged to the feature branch to facilitate moving forward with sparse-mode work in the [redacted] repo.

git sparse-checkout init initializes the core.sparseCheckout config variable to cone, which restricts the pattern set to our new model.

git sparse-checkout add reads a list of folders from stdin and creates the proper patterns in the sparse-checkout file, then runs git read-tree -mu HEAD to update the index and populate the working directory.

git sparse-checkout list shows the patterns in the sparse-checkout file.

Implements init, add, and list. Save 'remove' for later.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee
Copy link
Collaborator Author

Closing, and will merge on top of v2.23.0 instead.

@dscho
Copy link
Member

dscho commented Aug 22, 2019

will merge on top of v2.23.0 instead.

Did you know that you can change the target branch of a PR? ;-)

derrickstolee added a commit that referenced this pull request Aug 22, 2019
I'm creating this PR for a fourth time (see #163, #171, and #178 for earlier versions). This version is tracking my progress to create something that can be sent as an RFC upstream, but also can be used to start the sparse feature branch. This is based on v2.23.0.

Note: I currently have conflicts with the virtual filesystem feature, and I'll resolve those with a merge commit when I'm ready. I'm just creating this for tracking progress at the moment, but can also be a place for early feedback.

* git sparse-checkout disable to disable the sparse-checkout feature and return to a full checkout.
* git sparse-checkout init --cone, to initialize in cone mode.
* git sparse-checkout add when core.sparseCheckout=cone.

This includes performance improvements with the hashset-based matching algorithm, but I'll leave further enhancements as smaller steps on top. Here are a few things I want to try:

Track the maximum depth of a prefix pattern, so we know to not run hashes for deeper paths.
Use the "known exclude" bit in cone mode to stop hashing paths we know will not be included.
Use the "known include" bit in cone mode to stop hashing paths we know will be included. This is more difficult than "known exclude" because we need to distinguish directories from files when doing path matches so we don't give a directory a "known include" when it isn't a recursive pattern match.
ldennington added a commit to ldennington/git that referenced this pull request Sep 17, 2021
This version allows us to update existing `winget` manifests by
specifying a manifest's SHA if it already exists in `microsoft/winget-pkgs`.

Pull Requests
---------------

* [microsoft#178](mjcheetham/update-winget#179): Allow
updates to existing winget manifests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants