summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-28 22:37:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-28 22:37:17 -0400
commit86c5bd0327ba1ff0d6aed8ce47031a8497a3e2fb (patch)
treedc58a21c24630d8b945954c160852ca479205aa7
parent14ffb5d47bdb07e8263a2112b1634b403a299005 (diff)
unused --from . checks local repo, for consistency
-rw-r--r--Command/Unused.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index 96001683d..5422dad69 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -37,13 +37,12 @@ seek = [withNothing start]
start :: CommandStartNothing
start = notBareRepo $ do
from <- Annex.getState Annex.fromremote
- case from of
- Nothing -> pass "." checkUnused
- Just n -> pass n $ checkRemoteUnused n
- where
- pass n a = do
- showStart "unused" n
- next a
+ let (name, action) = case from of
+ Nothing -> (".", checkUnused)
+ Just "." -> (".", checkUnused)
+ Just n -> (n, checkRemoteUnused n)
+ showStart "unused" name
+ next action
checkUnused :: CommandPerform
checkUnused = do