metadata: Added -r to remove all current values of a field.

This commit is contained in:
Joey Hess 2016-02-29 13:00:46 -04:00
parent 98fcc23e4f
commit e520366c4d
Failed to extract signature
5 changed files with 39 additions and 17 deletions

View file

@ -61,7 +61,7 @@ dateMetaData mtime old = MetaData $ M.fromList $ filter isnew
parseModMeta :: String -> Either String ModMeta
parseModMeta p = case lastMaybe f of
Just '+' -> AddMeta <$> mkMetaField f' <*> v
Just '-' -> DelMeta <$> mkMetaField f' <*> v
Just '-' -> DelMeta <$> mkMetaField f' <*> (Just <$> v)
Just '?' -> MaybeSetMeta <$> mkMetaField f' <*> v
_ -> SetMeta <$> mkMetaField f <*> v
where