Skip to content
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

Git refresh should not show hidden submodules #88670

Closed
xmedeko opened this issue Jan 15, 2020 · 8 comments
Closed

Git refresh should not show hidden submodules #88670

xmedeko opened this issue Jan 15, 2020 · 8 comments
Assignees
Labels
git GIT issues info-needed Issue requires more information from poster

Comments

@xmedeko
Copy link
Contributor

xmedeko commented Jan 15, 2020

I have manual Git refresh (unchecked Git Autorefresh). I have hid some submodules also (Source Control -> right click on submodule -> Hide). When I invoke command "Git: Refresh" a list of all submodules is shown. I do not want to have hidden submodules in the list.

Note: the hidden submodules are kind of read-only for me and very rarely updated. I can refresh them from a command line if I need to, or show them, refresh and hide them. Maybe some command "Git: Refresh All" could be handy to refresh all submodules at once.

Note 2: have not tested the behaviour with Git Autorefresh, AFAIK hidden submodules should not be auto updated, too.

@vscodebot
Copy link

vscodebot bot commented Jan 15, 2020

@joaomoreno
Copy link
Member

@xmedeko Can you share a screen recording of the issue? Thanks!

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Jan 16, 2020
@xmedeko
Copy link
Contributor Author

xmedeko commented Jan 22, 2020

I've made an example vscodegitbug. First, I hide the submodules dojo and dijit in the Source Control bar.

vscodegitbug_1

Then, I enter the command "Git: Refresh", but still see all submodules.

vscodegitbug_2

I would like to see the original module vscodegitbug and the eemitter module only. (Do not know, why the vscodegitbug is not the first in the list).

Maybe some people want to see the hidden submodules, too? Then, I would welcome some way how to hide certain (user defined) submodules completely from the VS Code GUI. Even from the SOURCE CONTROL PROVIDERS list.

@joaomoreno
Copy link
Member

joaomoreno commented Jan 23, 2020

Oh, when you hide a repository, you don't really close it. You're just hiding it from view, but VS Code still knows about it. Have you tried Git: Close Repository? There's also the git.ignoredRepositories setting.

@xmedeko
Copy link
Contributor Author

xmedeko commented Jan 23, 2020

Yes, closing the repository is probably what I need, thanks. I cannot find a doc for that. Does it any git changes action or is it just a pure VS Code action?

Also, is git.gnoredRepositories documented somewhere? Thanks.

Note: I've read https://code.visualstudio.com/docs/editor/versioncontrol and tried to google for these features.

@joaomoreno
Copy link
Member

It's a pure VS Code action.

Since git.ignoredRepositories is an extension (albeit built-in) setting, it's not documented. But our settings editor has an excellent search feature built in, you could certainly find it there.

Glad to know this addresses your pain point, closing the issue.

@xmedeko
Copy link
Contributor Author

xmedeko commented Jan 23, 2020

Yes, i have found the "Git: Ignored Repositories" in the Settings, but the doc "List of git repositories to ignore." is not much of help. How is that different to closing repo?

How to open the repository again? When I try "Git: Open Repository", and choose the submodule path, then I do not see submodule in the Source Control bar. Does it work for submodules?

@xmedeko
Copy link
Contributor Author

xmedeko commented Jan 23, 2020

OK, found the problem.

  1. First I have set ./src/dojo into the "Git: Ignored Repositories". But the repository remained in the Source Control Providers bar.
  2. So I have closed it. It disappeared from the Source Control Providers bar.
  3. I have tried to "Git: Open Repository" the repository path, but no luck.
  4. I have cleared the "Git: Ignored Repositories" list.
  5. Then have tried "Git: Open Repository" and voilà, the repository is in the Source Control Providers bar again.

And then:
6. Close the dijit submodule.
7. Reopen the VS Code, but the dijit submodule is in the Source Control Providers again.

So, in order to close a submodule permanently, I have to add it to the "Git: Ignored Repositories". In order to open it again, I have to remove it from the "Git: Ignored Repositories" first. It's pretty confusing.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants