1
0
Fork 0
mirror of https://github.com/Luzifer/git-recurse-status.git synced 2024-12-22 12:01:19 +00:00

Add meta-filter "remote"

This commit is contained in:
Knut Ahlers 2016-10-28 15:12:57 +02:00
parent 51dabbb3e7
commit b2d7601acf
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -30,6 +30,8 @@ const (
MOD_DELETED = "deleted"
MOD_STASHED = "stashed"
MOD_CHANGED = "changed" // Special status to filter all repos having any changes
FILTER_REMOTE = "remote"
)
var (
@ -125,6 +127,13 @@ func (r repoStatus) matches(filters []string) bool {
if r.Modifications[f] != expect && str.StringInSlice(f, collectionModifications) {
match = false
}
switch f {
case FILTER_REMOTE:
if (r.Remote != "") != expect {
match = false
}
}
}
return match