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

Handle rename event #64

Closed
wants to merge 2 commits into from
Closed

Conversation

prichey
Copy link
Contributor

@prichey prichey commented Oct 25, 2023

Resolves #49.

Handles a rename event in the file watcher by prompting a reload, which ensures that the watcher does not become detached upon git checkout

break;
}
default:
throw new Error("Unrecognized event: " + event);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't throw here. On some OS, there could be some other event type and I think it would be best to just log it and carry on. Or, if we wanted to be more cautious about it, we could send a "reload".

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to reload here? Can’t we just re-initialize the file watcher?

@prichey
Copy link
Contributor Author

prichey commented Oct 26, 2023

Closing in favor of #67

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.

File watching should handle rename events
3 participants