mirror of
https://github.com/Luzifer/git-recurse-status.git
synced 2024-12-23 04:21:17 +00:00
Add meta-filter "remote"
This commit is contained in:
parent
51dabbb3e7
commit
b2d7601acf
1 changed files with 9 additions and 0 deletions
9
main.go
9
main.go
|
@ -30,6 +30,8 @@ const (
|
||||||
MOD_DELETED = "deleted"
|
MOD_DELETED = "deleted"
|
||||||
MOD_STASHED = "stashed"
|
MOD_STASHED = "stashed"
|
||||||
MOD_CHANGED = "changed" // Special status to filter all repos having any changes
|
MOD_CHANGED = "changed" // Special status to filter all repos having any changes
|
||||||
|
|
||||||
|
FILTER_REMOTE = "remote"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -125,6 +127,13 @@ func (r repoStatus) matches(filters []string) bool {
|
||||||
if r.Modifications[f] != expect && str.StringInSlice(f, collectionModifications) {
|
if r.Modifications[f] != expect && str.StringInSlice(f, collectionModifications) {
|
||||||
match = false
|
match = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch f {
|
||||||
|
case FILTER_REMOTE:
|
||||||
|
if (r.Remote != "") != expect {
|
||||||
|
match = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return match
|
return match
|
||||||
|
|
Loading…
Reference in a new issue