1
0
mirror of https://github.com/Luzifer/git-recurse-status.git synced 2024-09-19 00:12:58 +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