-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Watcher: changes from git operations are reported as add
and not change
#136460
Comments
@moloko can you please configure |
@bpasero Yes I still have the issue on VSC v1.62.0 with I am running macOS v11.6.1 on an M1 Macbook Pro - but also get the same issue on my old Intel Mac (same OS version) I'll try the Insider build tomorrow if I can Version: 1.62.0 |
@moloko please do. I just gave it a test:
|
Ok, I see a difference in events:
We used I am not surprised that One workaround for your extension would be to handle this case too, not just the changed case. I would still have to figure out if the file is actually deleted and added on disk or changed. |
add
and not change
add
and not change
/.git/HEAD
are reported as add
and not change
/.git/HEAD
are reported as add
and not change
.git/HEAD
are reported as add
and not change
Cool, though I'm not actually the author of that extension, that'd be @teledemic |
This is actually parcel-bundler/watcher#72 which I had been reporting before. At the moment the only workaround is to react to any change kind for this file to detect a branch switch. |
.git/HEAD
are reported as add
and not change
.git/HEAD
are reported as add
and not change
I am going ahead to close this, I am not sure if my PR will be accepted but the workaround is to update downstream consumers to also listen to add events. |
.git/HEAD
are reported as add
and not change
add
and not change
Reopening for tracking. |
Doesn't look like it has helped I'm afraid, same issue as before. I'm using: |
Thanks for trying, it was working for me though in my simple example where I switched a branch that changes a single file. |
@bpasero weirdly even enabling the 'legacy watcher' now no longer works for me, in both Insider build and v1.62.3 (I think it stopped working a few weeks back). If I amend Teledemic's extension to have a handler for |
Yeah it is always best as an extension to react to both create and change events because there is no 100% guarantee. |
Not sure there is anything to verify here, and I assume you don't want to reopen the issue? |
This is basically the same issue as #134851 but I can't re-open that so creating a new issue
There are full details of the problem here: teledemic/vscode-branch-warning#15 (most of the specifics are in this comment) hope it's OK to link to that rather than reproduce here...
The text was updated successfully, but these errors were encountered: