awaescher / RepoZ

👨‍💻 A zero-conf git repository hub for Windows and macOS with Windows Explorer- & CLI-enhancements
MIT License
1.01k stars 93 forks source link

Add configuration option #93

Closed Whil- closed 4 years ago

Whil- commented 4 years ago

Hi,

This tool is said to be zero-config. But I'm finding that to be a bit to aggressive for my own taste. Maybe a configuration could be given to show where in my folder-tree RepoZ should look for repositories? Because I have lots of folders with minor GIT-libraries that was important at some point and still are valid for archiving purposes. But nothing more. And while I see the nice side of RepoZ, especially with the option of keeping repositories up to date, I wouldn't want the tool to have to scan my whole system and all my repositories.

Thoughts?

And thanks for the tool non the less!

Regards Gustav

awaescher commented 4 years ago

Hi Gustav.

Understood. Maybe I will look at this later on. I'd suggest to ignore these "archived" repositories. RepoZ will not track them anymore once they have been ignored. Wouldn't you say this is an appropriate workaround?

RepoZ is not scanning your whole system if you don't tell it to. There's a menu item to scan the system but this is just to find all repositories once. It is not meant to be repeated regularly. As long as you don't trigger this, it does not scan your system actively while it is running. What happens is slightly different: RepoZ listens to file change events from the file system. Once it finds changes it buffers the incoming messages (for performance reasons) and then checks whether it can find a git repository at the given path or not. If it does, it refreshes its repository stats. This may sound intense, in fact it's not at all.

By listening to these changes, you don't need to scan the system for changes in existing repositories or even to track new ones. Usually, RepoZ detects newly cloned git repositories immediately. If not, just change a branch in a given repository - RepoZ will detect that and list your repository.

With this, you don't even need to trigger the system scan at all - you'll add one repository after another.

Best regards.

Whil- commented 4 years ago

Ah ok. So it's listening to all filesystem changes for changes?

If so then also that might be of use of some scope-limitation, to only look in one or a predefine set of folders maybe..? But not sure how or even if that can be configured because I suppose you use some operating system features for that...

And thanks for the explanation. Not triggering a whole system scan is already to late since it's .. already done! So I'll go through the list and ignore things. For next installation I'll know to not scan but simply wait for the tool to find the repositories itself.

Thanks again Gustav

awaescher commented 4 years ago

You can reset the list in the menu. Just clear it and let it repopulate while you change things in the repositories. I could do a path restriction, yes. But I see a UI to configure this (which is not something one can do in a sexy way) which users won't like. In fact, I see no problem with the current approach and I think people like things more that simply work.

Whil- commented 4 years ago

I just find the idea of the tool silently laying there and constantly listening to all filesystem events happening in the background to be bothersome. Especially performance-wise where I suspect it will constantly sip away CPU cycles. Even though probably never a lot. But it will have to listen in to ALOT of events all the time when only a tiny fraction would be needed if I as a user could help it out.

But again, haven't looked at the source code and I may misunderstand the tools use of the filesystem.

Btw, I took a look at the task manager just now and saw RepoZ sipping between 0,1%-1% of the CPU. This is while I'm personally only having a few applications open and browsing the web. No coding involved.

Regards

awaescher commented 4 years ago

Won't dig into that since I see no problem with the current approach.