diff options
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r-- | Command/Unused.hs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index 7570dfe90..a2e1c86de 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -41,12 +41,7 @@ start = notBareRepo $ do perform :: CommandPerform perform = do - from <- Annex.getState Annex.fromremote - case from of - Just name -> do - r <- Remote.byName name - checkRemoteUnused r - _ -> checkUnused + maybe checkUnused checkRemoteUnused =<< Annex.getState Annex.fromremote next $ return True checkUnused :: Annex () @@ -63,8 +58,11 @@ checkUnused = do writeUnusedFile file unusedlist return $ length l -checkRemoteUnused :: Remote.Remote Annex -> Annex () -checkRemoteUnused r = do +checkRemoteUnused :: String -> Annex () +checkRemoteUnused name = checkRemoteUnused' =<< Remote.byName name + +checkRemoteUnused' :: Remote.Remote Annex -> Annex () +checkRemoteUnused' r = do g <- Annex.gitRepo showNote $ "checking for unused data on " ++ Remote.name r ++ "..." referenced <- getKeysReferenced |