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
|
@ -12,6 +12,7 @@ import Logs.Location
|
|||
import Annex.Content
|
||||
import Backend
|
||||
import Types.KeySource
|
||||
import Utility.Metered
|
||||
|
||||
cmd :: Command
|
||||
cmd = command "reinject" SectionUtility
|
||||
|
@ -53,7 +54,7 @@ startSrcDest _ = giveup "specify a src file and a dest file"
|
|||
startKnown :: FilePath -> CommandStart
|
||||
startKnown src = notAnnexed src $
|
||||
starting "reinject" (ActionItemOther (Just src)) $ do
|
||||
mkb <- genKey (KeySource src src Nothing) Nothing
|
||||
mkb <- genKey (KeySource src src Nothing) nullMeterUpdate Nothing
|
||||
case mkb of
|
||||
Nothing -> error "Failed to generate key"
|
||||
Just (key, _) -> ifM (isKnownKey key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue