aboutsummaryrefslogtreecommitdiff
path: root/Command/View.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-02 14:53:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-02 14:53:19 -0400
commitd6744f85d3ad9b924eeee47148d34bec6992b5eb (patch)
treee2e6bd867580e8850a7fbab6df2df18eb12ccf7d /Command/View.hs
parentbe4e7d409c851eb1f0e65da98f93331c5ba8c1b7 (diff)
view, vfilter: Add support for filtering tags and values out of a view, using !tag and field!=value.
Note that negated globs are not supported. Would have complicated the code to add them, without changing the data type serialization in a non-backwards-compatable way. This commit was sponsored by Denver Gingerich.
Diffstat (limited to 'Command/View.hs')
-rw-r--r--Command/View.hs14
1 files changed, 0 insertions, 14 deletions
diff --git a/Command/View.hs b/Command/View.hs
index 932bc2d00..9aad12558 100644
--- a/Command/View.hs
+++ b/Command/View.hs
@@ -13,8 +13,6 @@ import qualified Git
import qualified Git.Command
import qualified Git.Ref
import qualified Git.Branch
-import Types.MetaData
-import Annex.MetaData
import Types.View
import Annex.View
import Logs.View
@@ -46,18 +44,6 @@ perform view = do
paramView :: String
paramView = paramPair (paramRepeating "TAG") (paramRepeating "FIELD=VALUE")
-{- Parse field=value
- -
- - Note that the field may not be a legal metadata field name,
- - but it's let through anyway.
- - This is useful when matching on directory names with spaces,
- - which are not legal MetaFields.
- -}
-parseViewParam :: String -> (MetaField, String)
-parseViewParam s = case separate (== '=') s of
- (tag, []) -> (tagMetaField, tag)
- (field, wanted) -> (mkMetaFieldUnchecked field, wanted)
-
mkView :: [String] -> Annex View
mkView params = do
v <- View <$> viewbranch <*> pure []