GitLiveApp / GitLive

GitLive Docs
82 stars 24 forks source link

filter branches by different criteria #134

Open barmalejj opened 1 year ago

barmalejj commented 1 year ago

I tried your extension and found it amazing! My main feature is conflicts detection. Was looking for something like that for years. For downsides I would say it quite poorly configurable (only 4 very general options in menu). What I really luck in current version is ability to scope branches by some criteria. In our process we have quite lots of technical branches e.g. release branches etc. and track those is absolutely unnecessary and even confusing for me. Also would be very good to be able enable/disable features selectively, like if I only want conflicts detection and do not want realtime pair programming.

nbransby commented 1 year ago

Hey @barmalejj thanks, these are some great suggestions. We'll let you know when they make it into the product, how do you differentiate your release branches from your your feature branches?

Steakeye commented 1 year ago

If there's some naming convention, an ignore pattern (glob or RegEx) might be appliable

barmalejj commented 1 year ago

Yes, we use name convention, so regex would work perfectly!

nbransby commented 1 year ago

@barmalejj I would like to understand your use case a little more if possible - for your release branches that you want to filter out - aren't those always behind your default branch anyway so would not show in GitLive? And if they are ahead of the default branch would you not want to see them in GitLive due to the possibility of them containing conflict changes?

barmalejj commented 1 year ago

Not exactly always behind. We have lots of different environments with different configurations and we use cherry-pick to create release branches. I understand your point. I think instead of adding some default behaviour it would be good to make it maximum flexible. At least in the beginning.

nbransby commented 1 year ago

I see so the changes on the release branches will already be present on other branches and shown in GitLive therefore showing the releases branches as well is just additional noise.

Since the regex is easy to implement we will try and add it in our eap release as soon as we can

Ygnys commented 1 year ago

Hi @barmalejj, the ability to specify a regex in the settings to restrict the branches that appear in the team sidebar and gutter indicators is now available in EAP. Here you can find instructions on how to switch to EAP in JetBrains and VS Code. Will be happy to hear how it works for you!

barmalejj commented 1 year ago

@Ygnys good to hear, I'm happy to try that with my team. Unfortunately I can't promise soonish feedback since we have to do some preparations to get a chance to test this tool.

Ygnys commented 1 year ago

Thanks @barmalejj, looking forward to your feedback :)

Ygnys commented 1 year ago

Hi @barmalejj, the feature has been updated and is now available in the newest stable version. With the regex, you can specify which branches are not feature branches and hoist them to the top level in the repository view. Here you can find more details. We'll be happy to receive your feedback once you manage to test it.

tcf909 commented 1 year ago

@Ygnys I noticed adding branches to this list doesn't keep them from being considered when showing changes in the code.

We have a filter "releases/.*" which is hoisting the branches in the list fine, but this shows up in the ide as changes. These branches are historic and will not be brought in to main / feature branches.

image

This creates quite a bit of confusion as we are not sure without extra effort if the changes should be considered.

Ygnys commented 1 year ago

Hi @tcf909, thanks for reporting! We are working on it and will update you as soon as we release a fix for this