summaryrefslogtreecommitdiff
path: root/Command/DropUnused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-01-06 10:14:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-01-06 10:57:57 -0400
commit1f8a1058c96bd4ee11fcb353f0ede1842d79ab6a (patch)
tree0754233445da5c75737aa2b7866881d30939ec56 /Command/DropUnused.hs
parentdf21cbfdd2b7342c206ebd4aea32d989328374dc (diff)
tweak
Diffstat (limited to 'Command/DropUnused.hs')
-rw-r--r--Command/DropUnused.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs
index 1c5bf8b8c..0b2a60216 100644
--- a/Command/DropUnused.hs
+++ b/Command/DropUnused.hs
@@ -15,6 +15,7 @@ import qualified Annex
import qualified Command.Drop
import qualified Remote
import qualified Git
+import qualified Option
import Types.Key
type UnusedMap = M.Map String Key
@@ -51,13 +52,14 @@ start (unused, unusedbad, unusedtmp) s = search
next $ a key
perform :: Key -> CommandPerform
-perform key = maybe droplocal dropremote =<< Remote.byName =<< Annex.getField "from"
+perform key = maybe droplocal dropremote =<< Remote.byName =<< from
where
dropremote r = do
showAction $ "from " ++ Remote.name r
ok <- Remote.removeKey r key
next $ Command.Drop.cleanupRemote key r ok
droplocal = Command.Drop.performLocal key (Just 0) -- force drop
+ from = Annex.getField $ Option.name Command.Drop.fromOption
performOther :: (Key -> Git.Repo -> FilePath) -> Key -> CommandPerform
performOther filespec key = do