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. -}
|
||||
excludeReferenced :: [Key] -> Annex [Key]
|
||||
-- excludeReferenced [] = return [] -- optimisation
|
||||
excludeReferenced [] = return [] -- optimisation
|
||||
excludeReferenced l = do
|
||||
g <- Annex.gitRepo
|
||||
c <- liftIO $ Git.pipeRead g [Param "show-ref"]
|
||||
|
@ -180,7 +180,7 @@ excludeReferenced l = do
|
|||
excludeReferenced' :: ([Annex [Key]]) -> S.Set Key -> Annex [Key]
|
||||
excludeReferenced' [] s = return $ S.toList s
|
||||
excludeReferenced' (a:as) s
|
||||
-- | s == S.empty = return [] -- optimisation
|
||||
| s == S.empty = return [] -- optimisation
|
||||
| otherwise = do
|
||||
referenced <- a
|
||||
let !s' = remove referenced
|
||||
|
|
Loading…
Reference in a new issue