fabioz / mu-repo

Tool to help in dealing with multiple git repositories
http://fabioz.github.io/mu-repo/
Other
295 stars 37 forks source link

Feature: repository filtering #73

Closed rocketraman closed 1 year ago

rocketraman commented 1 year ago

It would be nice if the set of repositories could be filtered based on some dynamic properties. For example:

It would be a kind of dynamic grouping function.

fabioz commented 1 year ago

Hi @rocketraman.

To be fair, I don't really see this being implemented by myself (I don't see that much value and haven't really missed that feature). Are you interested in providing a PR?

rocketraman commented 1 year ago

@fabioz Thanks for your reply. Maybe I'm just missing the right way to use the tool. How do you handle the case where a branch is in a subset of the repos, and you want to run commands only on repos with that branch name? Or do you just create the branch in every repo, and sometimes it just remains a pointer to master?

fabioz commented 1 year ago

Usually the way I work is: create a group with the repos I'm interested in for a given project and then always create the branch in all repos in that group (see: https://fabioz.github.io/mu-repo/grouping/), so, all repos are always consistent.

rocketraman commented 1 year ago

Thanks, let me try that approach. My issue for the change I am working on now is I don't know which repositories I'll be changing in advance, so the group is more "dynamic". However, I can see that appproach working for the majority of use cases.

I don't have time to submit a PR at the moment, so I'll go ahead and close this.

fabioz commented 1 year ago

As a note, the .mu_repo file format is pretty simple, so, sometimes it's easy to just edit in an editor to define what you're working with (or to change groups).