parallel fsck (yes, these changes are all it takes now!)
authorJoey Hess <joeyh@joeyh.name>
Wed, 4 Nov 2015 20:26:21 +0000 (16:26 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 4 Nov 2015 20:28:14 +0000 (16:28 -0400)
Command/Fsck.hs
debian/changelog
doc/git-annex-fsck.mdwn

index dbbb0e67fb364b657dea1b3fbfb8406dbca2140f..0e0d37acf5f31e04890027120db226b001c460c9 100644 (file)
@@ -44,7 +44,7 @@ import Data.Time.Clock.POSIX
 import System.Posix.Types (EpochTime)
 
 cmd :: Command
-cmd = withGlobalOptions annexedMatchingOptions $
+cmd = withGlobalOptions (jobsOption : annexedMatchingOptions) $
        command "fsck" SectionMaintenance
                "find and fix problems"
                paramPaths (seek <$$> optParser)
@@ -87,7 +87,7 @@ optParser desc = FsckOptions
                        ))
 
 seek :: FsckOptions -> CommandSeek
-seek o = do
+seek o = allowConcurrentOutput $ do
        from <- maybe (pure Nothing) (Just <$$> getParsed) (fsckFromOption o)
        u <- maybe getUUID (pure . Remote.uuid) from
        i <- prepIncremental u (incrementalOpt o)
index 66f3af186ea04ae012efb583d68e0f1d617856b8..db157e0ce95f4ff323994417f69fe2f3502ed721 100644 (file)
@@ -1,6 +1,8 @@
 git-annex (5.20151102.2) UNRELEASED; urgency=medium
 
-  * Use concurrent-output library for -Jn mode.
+  * Use concurrent-output library.
+  * Additional commands now suppport the -J flag for running multiple
+    actions concurrently with nicely displayed messages: fsck
 
  -- Joey Hess <id@joeyh.name>  Wed, 04 Nov 2015 12:50:20 -0400
 
index 68c824c91ede14381b39a6124fe5cf7b9e2e8475..4b3b510405c9cc5ad1e07518db40d78dd92daa8a 100644 (file)
@@ -85,6 +85,10 @@ With parameters, only the specified files are checked.
   The [[git-annex-matching-options]](1)
   can be used to specify files to fsck.
 
+* `--jobs=N` `-JN`
+
+  Runs multiple fsck jobs in parallel. For example: `-J4`
+
 # OPTIONS
 
 # SEE ALSO