enable short-circuiting optimisatons
This commit is contained in:
parent
b4d5c10fb7
commit
8e4bd621b9
1 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ unusedKeys = do
|
||||||
|
|
||||||
{- Finds keys in the list that are not referenced in the git repository. -}
|
{- Finds keys in the list that are not referenced in the git repository. -}
|
||||||
excludeReferenced :: [Key] -> Annex [Key]
|
excludeReferenced :: [Key] -> Annex [Key]
|
||||||
-- excludeReferenced [] = return [] -- optimisation
|
excludeReferenced [] = return [] -- optimisation
|
||||||
excludeReferenced l = do
|
excludeReferenced l = do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
c <- liftIO $ Git.pipeRead g [Param "show-ref"]
|
c <- liftIO $ Git.pipeRead g [Param "show-ref"]
|
||||||
|
@ -180,7 +180,7 @@ excludeReferenced l = do
|
||||||
excludeReferenced' :: ([Annex [Key]]) -> S.Set Key -> Annex [Key]
|
excludeReferenced' :: ([Annex [Key]]) -> S.Set Key -> Annex [Key]
|
||||||
excludeReferenced' [] s = return $ S.toList s
|
excludeReferenced' [] s = return $ S.toList s
|
||||||
excludeReferenced' (a:as) s
|
excludeReferenced' (a:as) s
|
||||||
-- | s == S.empty = return [] -- optimisation
|
| s == S.empty = return [] -- optimisation
|
||||||
| otherwise = do
|
| otherwise = do
|
||||||
referenced <- a
|
referenced <- a
|
||||||
let !s' = remove referenced
|
let !s' = remove referenced
|
||||||
|
|
Loading…
Reference in a new issue