summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Transferrer.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-24 17:23:58 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-24 17:23:58 -0400
commit8de7699f3905f5a3feb88cd6297f982f3666a201 (patch)
tree333b6a6062e7878b66d1e1b83b495aff9f4d2c2d /Assistant/Threads/Transferrer.hs
parentab5e409a95f6a3aa6b9be55f4c1465008af91dd5 (diff)
add transferkey command
Used by the assistant, rather than copy, this is faster because it avoids using git ls-files, avoids checking the location log redundantly, and runs in oneshot mode, avoiding making a commit to the git-annex branch for every file transferred.
Diffstat (limited to 'Assistant/Threads/Transferrer.hs')
-rw-r--r--Assistant/Threads/Transferrer.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Assistant/Threads/Transferrer.hs b/Assistant/Threads/Transferrer.hs
index 8118a3f3c..cb6f642bf 100644
--- a/Assistant/Threads/Transferrer.hs
+++ b/Assistant/Threads/Transferrer.hs
@@ -17,6 +17,7 @@ import Logs.Transfer
import Logs.Location
import Annex.Content
import qualified Remote
+import Types.Key
import System.Process (create_group)
@@ -101,11 +102,12 @@ transferThread dstatus slots t info runner = case (transferRemote info, associat
where
command = "git-annex"
params =
- [ Param "copy"
- , Param "--fast"
+ [ Param "transferkey"
+ , Param $ key2file $ transferKey t
, Param $ if isdownload
then "--from"
else "--to"
, Param $ Remote.name remote
+ , Param "--file"
, File file
]