plumb MeterUpdate into getKey
No behavior changes, but this shows everywhere that a progress meter could be displayed when hashing a file to add to the annex. Many of the places don't make sense to display a progress meter though, eg when importing the copy of the file probably swamps the hashing of the file.
This commit is contained in:
parent
191bdaafc5
commit
8355dba5cc
18 changed files with 60 additions and 44 deletions
|
@ -10,6 +10,7 @@ module Command.CalcKey where
|
|||
import Command
|
||||
import Backend (genKey)
|
||||
import Types.KeySource
|
||||
import Utility.Metered
|
||||
|
||||
cmd :: Command
|
||||
cmd = noCommit $ noMessages $ dontCheck repoExists $
|
||||
|
@ -19,7 +20,7 @@ cmd = noCommit $ noMessages $ dontCheck repoExists $
|
|||
(batchable run (pure ()))
|
||||
|
||||
run :: () -> String -> Annex Bool
|
||||
run _ file = genKey (KeySource file file Nothing) Nothing >>= \case
|
||||
run _ file = genKey (KeySource file file Nothing) nullMeterUpdate Nothing >>= \case
|
||||
Just (k, _) -> do
|
||||
liftIO $ putStrLn $ serializeKey k
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue