3

guys, we switched to GIT some time ago from TFVC and now since all branches are in the same folder, when I am switching a branch Resharper starts to scan all files that were changed, and since I am switching a lot - it is very annoying.

Is there any way to make Resharper cache work correctly with branches?

Immelstorn
  • 137
  • 1
  • 12
  • This sounds like ReSharper is behaving correctly - if the files have changed, they need to be rescanned. What are you expecting to happen? – citizenmatt Aug 22 '16 at 09:00
  • I want him to have separate cache of each branch and understand when I changed branch, so it can change its cache. But it sounds like some kind of a dream – Immelstorn Aug 22 '16 at 12:11

1 Answers1

3

since all branches are in the same folder

They don't have to be: since Git 2.5, you can clone once, but checkout different branches in different folders.

So if you had a certain folder structure in TFVC, you can emulate it with Git and get back to a known behavior.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • yes, this thing is almost what I need, but unfortunately it is not supported in VS2015 yet, so I can't use it to fast switch branches – Immelstorn Aug 22 '16 at 08:03
  • @Immelstorn Then you need to manage multiple clone of the same repo in different folder: this is a workaround, but once VS2015 (which uses libgit2 + LibGit2Sharp) supports multiple working tree, you won't have to do that anymore. There a pending issue: https://github.com/libgit2/libgit2/issues/3159. And a pending PR: https://github.com/libgit2/libgit2/pull/3436 – VonC Aug 22 '16 at 08:06
  • not realy a solution, VS integrated tools will not track this, so the only way is to wait until worktrees will be implemented in VS – Immelstorn Aug 22 '16 at 08:43
  • Agreed, but would that at least allow resharper to behave correctly? – VonC Aug 22 '16 at 08:47