drop -Jn
authorJoey Hess <joeyh@joeyh.name>
Wed, 4 Nov 2015 21:13:20 +0000 (17:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 4 Nov 2015 21:13:20 +0000 (17:13 -0400)
Command/Drop.hs
debian/changelog
doc/git-annex-drop.mdwn

index 5c5328618b4a463c2c3e62a49b24641f3f81c2d2..b26a4842aa1897a8ee49c96a671dc8b6eb805e8e 100644 (file)
@@ -24,7 +24,7 @@ import System.Log.Logger (debugM)
 import qualified Data.Set as S
 
 cmd :: Command
-cmd = withGlobalOptions annexedMatchingOptions $
+cmd = withGlobalOptions (jobsOption : annexedMatchingOptions) $
        command "drop" SectionCommon
                "remove content of files from repository"
                paramPaths (seek <$$> optParser)
@@ -51,10 +51,11 @@ parseDropFromOption = parseRemoteOption $ strOption
        )
 
 seek :: DropOptions -> CommandSeek
-seek o = withKeyOptions (keyOptions o) (autoMode o)
-       (startKeys o)
-       (withFilesInGit $ whenAnnexed $ start o)
-       (dropFiles o)
+seek o = allowConcurrentOutput $
+       withKeyOptions (keyOptions o) (autoMode o)
+               (startKeys o)
+               (withFilesInGit $ whenAnnexed $ start o)
+               (dropFiles o)
 
 start :: DropOptions -> FilePath -> Key -> CommandStart
 start o file key = start' o key (Just file)
index db157e0ce95f4ff323994417f69fe2f3502ed721..44ed24a604cf11b5185c846940c2c037d7c94d27 100644 (file)
@@ -1,8 +1,8 @@
 git-annex (5.20151102.2) UNRELEASED; urgency=medium
 
-  * Use concurrent-output library.
-  * Additional commands now suppport the -J flag for running multiple
-    actions concurrently with nicely displayed messages: fsck
+  * Use concurrent-output library when configured with -fConcurrentOutput.
+    This allows nicely displayed messages when using the -J flag.
+  * Additional commands now suppport the -J flag: fsck, drop
 
  -- Joey Hess <id@joeyh.name>  Wed, 04 Nov 2015 12:50:20 -0400
 
index a3a79f8d7b8355e60782091b64d021c67dd5d468..2e207cd8b0b4c732dde5edce1c39ee4aa46b7d24 100644 (file)
@@ -55,6 +55,12 @@ safe to do so.
   The [[git-annex-matching-options]](1)
   can be used to specify files to drop.
 
+* `--jobs=N` `-JN`
+
+  Runs multiple drop jobs in parallel. This is particularly useful
+  when git-annex has to contact remotes to check if it can drop files.
+  For example: `-J4`  
+
 # SEE ALSO
 
 [[git-annex]](1)