diff options
Diffstat (limited to 'activity/git.lua')
-rw-r--r-- | activity/git.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/activity/git.lua b/activity/git.lua index b24fc09..f25192c 100644 --- a/activity/git.lua +++ b/activity/git.lua @@ -44,15 +44,13 @@ function git.lookup (repositories, filter) end -function git.any_value_filter (member, values) - return function (entry) - for _, value in pairs(values) do - if entry[member] == value then - return true - end +function git.maybe_filter (field, set) + if next(set) then + return function (entry) + return set[entry[field]] end - return false end + return nil end |