diff options
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r-- | Command/Unused.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index 8d45c51cb..59efe64c8 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -30,16 +30,19 @@ import qualified Annex.Branch import Annex.CatFile def :: [Command] -def = [dontCheck fromOpt $ command "unused" paramNothing seek +def = [withOptions [fromOption] $ command "unused" paramNothing seek "look for unused file content"] +fromOption :: Option +fromOption = fieldOption ['f'] "from" paramRemote "remote to check for unused content" + seek :: [CommandSeek] -seek = [withNothing start] +seek = [withNothing $ start] {- Finds unused content in the annex. -} start :: CommandStart start = do - from <- Annex.getState Annex.fromremote + from <- Annex.getField "from" let (name, action) = case from of Nothing -> (".", checkUnused) Just "." -> (".", checkUnused) |