From b2d7601acfb016317734c85b0d3e31652f975be6 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 28 Oct 2016 15:12:57 +0200 Subject: [PATCH] Add meta-filter "remote" --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.go b/main.go index c7edcde..71d3155 100644 --- a/main.go +++ b/main.go @@ -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