StreakyCobra / gws

Colorful KISS helper for git workspaces
https://streakycobra.github.io/gws/
MIT License
235 stars 22 forks source link

Have a flag/loglevel to only show affected repositories #29

Closed JohanSpaedtke closed 7 years ago

JohanSpaedtke commented 7 years ago

This is not a bug but a feature request

I use gws in a situation where i have ~150 repositories. It would be really nice to be able to do

gws ff --someNiceFlag

and have the output only show the repos affected (Dirty (Uncached changes) and/or Clean (fast-forwarded)) but not show all the repos with status Clean at all.

Regards //Johan

emlun commented 7 years ago

I've thought about this too, by being in literally the same situation... ;)

The current structure of the script isn't very well suited for adding the feature on, but I'll look into it. I don't think it should be that much work.

StreakyCobra commented 7 years ago

The current structure of the script isn't very well suited for adding the feature on

No, and bash doesn't really help 🙈

emlun commented 7 years ago

No, and bash doesn't really help 🙈

Unfortunately, you are very correct. xD

JohanSpaedtke commented 7 years ago

Knowing your language preferences you could always take a look here given you want to keep it in bash :P http://quasimal.com/posts/2012-05-21-funsh.html https://github.com/mikeplus64/fun.sh

emlun commented 7 years ago

I think I got it to work without regressions. @JohanSpaedtke Please try #30 and let me know how it works out!

StreakyCobra commented 7 years ago

@JohanSpaedtke Thanks for sharing, I'll bookmark this :smile:

@emlun Starting this project in bash was fun at beginning, but now I see this at the worst mistake in my life :scream:

JohanSpaedtke commented 7 years ago

@emlun seems to work great with --hide-clean but maybe update the help text to clarify that

gws --hide-clean

actually works (and I guess is equivalent to gws status --hide-clean)

JohanSpaedtke commented 7 years ago

One thing though... gws update --hide-clean I would have expected it to only show new repositories but (as stated in the help if you actually read it...) it doesn't do anything at all. (maybee --hide-clean isn't the best name here but well... functionality would be nice)

emlun commented 7 years ago

Yeah, I've also realized there are a few kinks in the current solution. For one thing, gws ff should probably still print those repos that were fast-forwarded.

emlun commented 7 years ago

@JohanSpaedtke update now also takes the option, please try it out!

JohanSpaedtke commented 7 years ago

seems to be working nicely ty :)

emlun commented 7 years ago

Nice, then this will be included in the next release. :)