vscode: vscode does not automatically open closed repos when a file is opened

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.80.0
  • OS Version: Windows 10 - using WSL

Steps to Reproduce:

On vscode 1.79.x I would do the following:

  1. Open a folder that contained many repos
  2. Open a file in a repo
  3. make some updates
  4. navigate to the “source control repositories” extension in the left hand pane, and the repo would be shown
  5. I may update a number of repos and all of those repos would be be shown in “source control repositories”
  6. If I had a lot of repos shown in “source control repositories” I may close a few to make it easier to navigate
  7. If I opened a file in a “closed” repo it would once again show in “source control repositories”.

In 1.80.0 this has changed

If I close a repo it no longer automatically shows in “source control repositories” if I open a file in that repo.

Only non-manually closed repos show, and as soon as I close them, they do not reappear when I open a file in the repo.

In fact, because the repo doesn’t open, I don’t even get an indication that files have been updated with changes.

I think this may be caused by:

https://github.com/microsoft/vscode/pull/184708 https://github.com/microsoft/vscode/issues/186155

This seems to be a change in behavior - and it makes the way I work more difficult. I’d expect that opening a file would automatically open the repo.

I’m not sure why there is any need to not reopen a repo when a file is opened.

How do I get back the old behavior. Or can the old versus new behaviour be made an option for the user to pick.

Or at least allow a right click on a file and be able to select an “open repo” option from the context menu.

Having to navigate to the command panel and open a closed repo is not intuitive and creates a bad workflow experience in my opinion.

Also, just an observation, but can the “source control repositories” list be made dragable. At the moment it takes up only about 25 percent of the left hand pane. It’d be nice to be able to expand it.

Thanks.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 12
  • Comments: 16 (2 by maintainers)

Most upvoted comments

OK, I just found the Command “reopen closed repository” … a bit hidden I’d say 😉

For those looking still open the command palette (cmd + shift + p on mac) and type Git: reopen closed repositories.

This command should get a placement in the dotmenu or an icon in the source control ui. Hard to find, escpecially if you are used to not needing it.

This change in behavior is just wrong and probably not exactly what was requested in #107398. It makes using the Source Control module harder and less intuitive, because if you close a repository, there is no obvious way to reopen it and VSCode just stops recognizing it.

I do not agree with “Manually closing a repository is an explicit and deliberate user gesture” statement, because there is nothing to actually make sure the action was deliberate and intended. I’ve just misclicked “Close Other Repositiories” instead of “Open in Integrated Terminal” and permanently closed 71 repositories. I couldn’t find any way to reopen them and they did not show up again after reloading a window, as they used to in the past. I spent some time googling how to reopen them, and eventually found the “Reopen Closed Repositories” command in the command palette. I spent some more time clicking them one by one and searching for the command again, before I found the item “All repositories” at the very end of long scrollable list of repos.

This is just bad design and confusing af.

OK, I just found the Command “reopen closed repository” … a bit hidden I’d say 😉

This works! Thanks

The latest VS Code Insiders release contains a new action in the title bar of the “Source Control Repositories” view to reopen the closed repositories.

Ran into the issue where a closed repository did not reopen after an applicable file was opened/changed. Very frustrating behavior considering there is no context menu (three dots) to reopen a closed repository. Burying this option in the command pallet, which I very successfully never use, is just not intuitive.

To add to this, since I too had to scramble to figure this out as well, can we at least have a warning or message on the first time we close a repo on how to reopen it?

Ran into the issue where a closed repository did not reopen after an applicable file was opened/changed. Very frustrating behavior considering there is no context menu (three dots) to reopen a closed repository. Burying this option in the command pallet, which I very successfully never use, is just not intuitive.

I wonder if the new behavior is what was really being requested. There seems to be confusion in https://github.com/microsoft/vscode/issues/107398 regarding what people expect to happen.

To me it seems people were experiencing an issue where a closed repo was reopening itself when there were no files reopened in that repo (I never experienced this issue myself).

I have found on 1.80 that even after stopping/starting vscode, my “closed” repos do not open if I open a file in those repos.

I appreciate everyone wants it to work in different ways, so I think an option to choose the desired behavior would be really nice. (just a tickbox to say “reopen repo when a file in that repo is opened”).

I have downgraded to 1.79.2 for now but will keep an eye on this issue.

OK, I just found the Command “reopen closed repository” … a bit hidden I’d say 😉

Thank you! I haven’t been looking as long as you, but I was searching for some way to reopen my repo after I closed the wrong one! Big thank you! I could have spent hours clicking on menu items fruitlessly.

I’m trying to have the closed-by-mistake repo back again since half an hour 😭

If it is intended, at least give a super-clean way to add a repo again, I didn’t found it. 😃

Experienced the same situation. Thank you very much! @drAlberT

OK, I just found the Command “reopen closed repository” … a bit hidden I’d say 😉

It works 👍🏻