Skip to content

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

Merged
merged 4 commits into from
Nov 29, 2018
Merged

Conversation

kewillford
Copy link
Member

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.

Copy link

@benpeart benpeart left a 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;

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?

Copy link
Member Author

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.

@kewillford kewillford force-pushed the index-changed-hook branch 2 times, most recently from 246331a to b94da14 Compare November 5, 2018 23:11
@kewillford kewillford force-pushed the index-changed-hook branch 2 times, most recently from 3fbae71 to 979653d Compare November 9, 2018 16:28
@kewillford kewillford closed this Nov 12, 2018
@kewillford kewillford reopened this Nov 12, 2018
@kewillford kewillford closed this Nov 12, 2018
@kewillford kewillford reopened this Nov 12, 2018
Copy link

@derrickstolee derrickstolee left a 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!

@kewillford kewillford merged commit 30eaf67 into microsoft:gvfs-2.19.1 Nov 29, 2018
@kewillford kewillford deleted the index-changed-hook branch November 29, 2018 03:25
dscho pushed a commit that referenced this pull request Dec 2, 2018
dscho pushed a commit that referenced this pull request Dec 10, 2018
derrickstolee pushed a commit that referenced this pull request Dec 17, 2018
dscho pushed a commit that referenced this pull request Feb 27, 2019
dscho pushed a commit that referenced this pull request Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants