-
Notifications
You must be signed in to change notification settings - Fork 100
Index changed hook #64
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
Index changed hook #64
Conversation
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.
Looks good overall. While the tests help document the hook, if we're ever going to upstream this we'll need to document it in Documentation\githooks.txt
builtin/reset.c
Outdated
refresh_index(&the_index, flags, NULL, NULL, | ||
_("Unstaged changes after reset:")); | ||
the_index.reset_mixed = 1; |
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.
Is this going to start colliding with Duy's work to remove the_index
everywhere? Is there something we can do now to prepare for that coming from upstream?
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.
I'm sure it will but he would need to change the refresh_index
method above as well so at that point we can just create the fixup commit to fix our use of the_index
as well.
246331a
to
b94da14
Compare
b94da14
to
e44b85b
Compare
3fbae71
to
979653d
Compare
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.
Coming by just at the end to say this looks good to me! I was playing with your tests on my Linux VM on Thursday to see how it worked. Good tests!
979653d
to
12b8b62
Compare
This adds a post index changed hook that VFSForGit will be able to use to detect when it needs to update it's projection of files.