Search usages shows stale results after switching git branches
See original GitHub issueI have project with large codebase. Sometimes editor.action.referenceSearch.trigger
does not show me all the results. When I search with regular grep - open this file - after this everything works fine. What is the workaround for it? #
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (11 by maintainers)
Top Results From Across the Web
Broken IntelliSense and stale projects after switching Git ...
Yesterday after switching branches, I built, ran and tested a solution. Created a pull request that subsequently failed on the build server. Why?...
Read more >Git housekeeping tutorial: clean-up outdated branches in local ...
After each git pull or git fetch command Git creates references to remote branches in local repository, but doesn't clean up stale references....
Read more >What is a "stale" git branch? - Stack Overflow
Stale branch is a branch without activity after some time. In Github it's stale after 3 months of inactivity.
Read more >git-reflog Documentation - Git
This command manages the information recorded in the reflogs. Reference logs, or "reflogs", record when the tips of branches and other references were...
Read more >How to Deal With Stale Branches on the Github - Medium
"Stale branch" is a git branch without commits for the last few months. For the Github, such period of inactivity is 3 months....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, I remember we did some investigation some time ago but never really got to the bottom of it. Something I’ve heard recently is that people sometimes get confused when they have a modified file open in VS Code and then do a git operation - VS Code shows no warning that the underlying file has changed until the user tries to save. This makes it easy to work with a stale file for a while in the editor and not really notice (it does have a dirty indicator, but with lots of tabs open this can quickly be off-screen).
I’m gonna close this for now, but if @Aetet is still seeing this one recent builds, we can re-open and look further.
Given how long it’s been since we had a stable build, I’d want to see this reproduced under a recent bleeding edge (or maybe dev) build.
That said, I don’t remember any specific fixes. Server ought to be getting notified when files on disk are changed (via the watcher package) and updating itself accordingly. There has always been some set of conditions under which this doesn’t work correctly, but as far as I remember we’ve been unable to characterize those conditions. I know that
git
commands are often cited as the operation being performed when this happens, but I don’t know why they causes problems.