summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Fsck.hs19
-rw-r--r--Command/Init.hs2
2 files changed, 14 insertions, 7 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index b0b9f7bb6..85a26a89b 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -16,13 +16,20 @@ import Messages
import qualified Command.FsckFile
seek :: [SubCmdSeek]
-seek = [withNothing start, withAll withFilesInGit Command.FsckFile.start]
+seek = [withString start, withAll withFilesInGit Command.FsckFile.start]
-{- Checks the whole annex for problems. -}
-start :: SubCmdStart
-start = do
- showStart "fsck" ""
- return $ Just perform
+{- Checks the whole annex for problems, only if specific files were not
+ - specified. -}
+start :: SubCmdStartString
+start whatspecified = do
+ if (null whatspecified)
+ then do
+ showStart "fsck" ""
+ return $ Just perform
+ else do
+ showStart "fsck" ""
+ showNote "only checking specified files"
+ return $ Just $ return $ Just $ return True
perform :: SubCmdPerform
perform = do
diff --git a/Command/Init.hs b/Command/Init.hs
index e3b05a83f..8110948a4 100644
--- a/Command/Init.hs
+++ b/Command/Init.hs
@@ -19,7 +19,7 @@ import Version
import Messages
seek :: [SubCmdSeek]
-seek = [withDescription start]
+seek = [withString start]
{- Stores description for the repository etc. -}
start :: SubCmdStartString