forked from git-for-windows/git
-
Notifications
You must be signed in to change notification settings - Fork 92
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
unpack-trees: hash less #185
Merged
derrickstolee
merged 1 commit into
microsoft:features/sparse-checkout-2.23.0
from
derrickstolee:sc-more-perf
Aug 27, 2019
Merged
unpack-trees: hash less #185
derrickstolee
merged 1 commit into
microsoft:features/sparse-checkout-2.23.0
from
derrickstolee:sc-more-perf
Aug 27, 2019
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
jrbriggs
approved these changes
Aug 27, 2019
jeffhostetler
approved these changes
Aug 27, 2019
The sparse-checkout feature in "cone mode" can use the fact that the recursive patterns are "connected" to the root via parent patterns to decide if a directory is entirely contained in the sparse-checkout or entirely removed. In these cases, we can skip hashing the paths within those directories and simply set the skipworktree bit to the correct value. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
force-pushed
the
sc-more-perf
branch
from
August 27, 2019 17:49
41966f6
to
3025dbd
Compare
derrickstolee
commented
Aug 27, 2019
garimasi514
reviewed
Aug 27, 2019
@@ -257,6 +257,10 @@ int read_directory(struct dir_struct *, struct index_state *istate, | |||
const char *path, int len, | |||
const struct pathspec *pathspec); | |||
|
|||
#define IS_EXCLUDED_UNKNOWN -1 | |||
#define IS_EXCLUDED_NOT_CONTAINS 0 |
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.
Some more context on what this means please? It doesn;t read very intuitively to me.
/azp run Microsoft.git |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Microsoft.git |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Creating the PR so I can generate installers and test the performance impact.
When updating the index using the cone-mode patterns for sparse-checkout, we should be able to immediately decide the new ce flags based on going out of the cone or hitting a recursive closure.
Modify
is_excluded_from_list()
to return a 2 for a recursive match, and use that value to immediately clear the skipworktree bit for everything in that directory. Similarly, if we get a 0, then keep the skipworktree bit on for everything in that directory. The value 1 means we saw that entry with a parent match, so should continue recursing.Testing this on our target enlistment gave the following results for
git read-tree -mu HEAD
: