-
Notifications
You must be signed in to change notification settings - Fork 63
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
query-watchman error when working in a worktree #338
Comments
Thanks for the report, @marcodejongh ! We'll take a look. |
Scalar can be improved to handle worktrees. In particular, we should probably set our fsmonitor hook setting in the worktree config (using @marcodejongh: you may be able to get out of this state by doing one of the following:
Perhaps it is enough for Scalar to discover the fully-rooted path and use that in the config. |
Resolves #338. This appears to be the issue: Someone runs scalar register in a repository that has worktrees. The worktrees start to use the core.fsmonitor config setting. The worktree tries to execute from .git/hooks/query-watchman, but that is not a path relative to the worktree. This fixes the configs setting. I've tested this on my Windows machine with a worktree of git/git. Cc: @kewillford the expert on fsmonitor. As a longer plan, we should consider adding tests that cover the case for worktrees.
@marcodejongh: This will be fixed in the next release. In my testing, my existing, incorrect config values were upgraded to the new values shortly after installing my new version (since we run |
Thanks will do! |
For anybody just googling - I am not using scaler, just git worktrees. At some point I enabled the query-watchman hook per the instructions here: https://github.com/git/git/blob/v2.28.0/templates/hooks--fsmonitor-watchman.sample
Fix from @derrickstolee worked great! |
When I use worktree I get a query watchmen error for every git command:
I set my repo up using
scalar register
instead ofclone
, so figured maybe the old worktree's I had when I ran register were broken. But creating a new worktree from the main checkout, also returns a error:The text was updated successfully, but these errors were encountered: