AssociatedFile newtype
To prevent any further mistakes like 301aff34c4
This commit was sponsored by Francois Marier on Patreon.
This commit is contained in:
parent
2cd7496210
commit
c8e1e3dada
43 changed files with 179 additions and 138 deletions
|
@ -13,12 +13,14 @@ import Limit
|
|||
import Types.FileMatcher
|
||||
|
||||
addWantGet :: Annex ()
|
||||
addWantGet = addLimit $ Right $ const $ checkWant $ wantGet False Nothing
|
||||
addWantGet = addLimit $ Right $ const $ checkWant $
|
||||
wantGet False Nothing
|
||||
|
||||
addWantDrop :: Annex ()
|
||||
addWantDrop = addLimit $ Right $ const $ checkWant $ wantDrop False Nothing Nothing
|
||||
addWantDrop = addLimit $ Right $ const $ checkWant $
|
||||
wantDrop False Nothing Nothing
|
||||
|
||||
checkWant :: (Maybe FilePath -> Annex Bool) -> MatchInfo -> Annex Bool
|
||||
checkWant a (MatchingFile fi) = a (Just $ matchFile fi)
|
||||
checkWant :: (AssociatedFile -> Annex Bool) -> MatchInfo -> Annex Bool
|
||||
checkWant a (MatchingFile fi) = a (AssociatedFile (Just $ matchFile fi))
|
||||
checkWant _ (MatchingKey _) = return False
|
||||
checkWant _ (MatchingInfo {}) = return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue