Do not close other repositories when opening a new repository

ubruhin 4 years ago updated by Car pente 3 months ago 11

Because opening large repositories is quite slow (~5-10s), I keep all my frequently used repositories open. But unfortunately all these repositories are closed every time I want to open one more repository. Selecting and opening all the already opened repositories again just to keep them open is quite annoying. And also when cloning or adding a new repository, it will be opened automatically while all other repositories are closed.

In my opinion, repositories shouldn't be closed automatically but only when the user triggers it manually.

This is intentionally, so you don't open all repositories and complain about having a memory hog and bad performance. Why do you keep your frequently used repositories open?

As I wrote above, I keep them open because opening large repositories takes too much time. For example when I'm working on repo1 and then quickly want to have a look on the log of repo2, switching to repo 2 takes ~5s and switching back to repo1 takes ~5s again. This is very annoying and prevents me from working efficiently.

I understand your argument about memory hog and bad performance. Maybe there were a compromise, for example:

  • Add a configuration option (either in the settings dialog or just in config files) to disable automatic closing of repositories.
  • Only close other repositories if memory usage, or the count of opened repositories is above a specific limit.
  • When opening a repository, make it possible to choose whether other repositories should be closed or not. For example with a context menu entry like "Open without closing others" or a keyboard modifier when double-clicking.
  • When adding/cloning a repository, add a checkbox like "Open repository after adding/cloning" which can be unchecked to prevent closing other repositories.

I could understand it if you don't like to add new GUI elements for this (advanced) feature. I would still be happy if the option was only available in config files. Btw. I have already increased the memory limit for SmartGit, so memory usage should't be a problem for me (any my colleagues).

Do you know that you can open the log for repositories without opening them?

Yes, I know that, maybe the log was a bad (too simple) example ;) Often I need to quickly look for local changes, make a commit, merge a branch, push some commits and so on.

Maybe it's not very usual that one work "simultaneously" on many projects, but at least in our department this is very common. So we have to switch between different project quite often. And also some of our projects are related to each other, so if one make a change in repo1, one also needs to make a change in repo2. Because of this, it is most efficient to always keep all repositories open which we work on in our daily business.

But at the time of writing, I had just a brilliant idea for a workaround :) I could create a new repository group for my favorite repositories, and as I just saw it is possible to open all repositories of one category at once...

You can select your current repo, and then the second repo, and "Right Click > Open Repository" this will keep your open repo open and also open the second repo. Yes, if you want more than that, selecting all the open repos could become a pain

I have more than 30 repos now. I often accidentally open a repo, then all current opening repos are closed. Why don't you make it as an option, users can decide what they want.

Because then users will blame the tool for becoming slow.

You can set default is off. Even put a warning message below this option.

I would also find such an ability useful. Our company makes use of many individual git repos (one for each library/module, which are sorted into categories (groups) in Smartgit). Being able to right-click and say "Open Repository As Well" or "Add to open repositories" would be quite helpful.

In case this helps, I have the repositories in groups and use

  right-click on group -> Open Repository | Open Repository in New Window

I use the Open Repository in New Window one all the time to keep open a group of repos and also open another repo group.

I support this request. I would like that you add an option to choose if you want to keep the repos open or not. The default value would be the current behavior. Only the users interested in this feature will change the default value.

A Low-level property is fine for me. It does not require any user interface change. You can define a property like 

repository.keepOpen= true | false

What do you think?