summaryrefslogtreecommitdiff
path: root/Limit.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-24 14:48:51 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-24 15:01:55 -0400
commit42e08cd4575d3dc558dfe172c1f28c752d69e8c6 (patch)
tree78a8eddc31c390aaf8f66435bb13db9366f9a7c4 /Limit.hs
parent34f375526f44ff255d45bbabcd1425b3d5d0bb4a (diff)
parent3b9d9a267b7c9247d36d9b622e1b836724ca5fb0 (diff)
Merge branch 'master' into no-xmpp
Diffstat (limited to 'Limit.hs')
-rw-r--r--Limit.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Limit.hs b/Limit.hs
index 4bd5dd59e..efe4fea85 100644
--- a/Limit.hs
+++ b/Limit.hs
@@ -73,7 +73,7 @@ addToken = add . Utility.Matcher.token
{- Adds a new limit. -}
addLimit :: Either String (MatchFiles Annex) -> Annex ()
-addLimit = either error (\l -> add $ Utility.Matcher.Operation $ l S.empty)
+addLimit = either giveup (\l -> add $ Utility.Matcher.Operation $ l S.empty)
{- Add a limit to skip files that do not match the glob. -}
addInclude :: String -> Annex ()
@@ -289,7 +289,7 @@ limitMetaData s = case parseMetaDataMatcher s of
addTimeLimit :: String -> Annex ()
addTimeLimit s = do
- let seconds = maybe (error "bad time-limit") durationToPOSIXTime $
+ let seconds = maybe (giveup "bad time-limit") durationToPOSIXTime $
parseDuration s
start <- liftIO getPOSIXTime
let cutoff = start + seconds