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
|
@ -41,6 +41,7 @@ import qualified Utility.Env.Set
|
|||
import qualified Utility.Exception
|
||||
import qualified Utility.ThreadScheduler
|
||||
import qualified Utility.Tmp.Dir
|
||||
import qualified Utility.Metered
|
||||
import qualified Command.Uninit
|
||||
import qualified CmdLine.GitAnnex as GitAnnex
|
||||
|
||||
|
@ -567,9 +568,9 @@ backend_ = Backend.lookupBackendVariety . Types.Key.parseKeyVariety . encodeBS
|
|||
getKey :: Types.Backend -> FilePath -> IO Types.Key
|
||||
getKey b f = fromJust <$> annexeval go
|
||||
where
|
||||
go = Types.Backend.getKey b
|
||||
Types.KeySource.KeySource
|
||||
{ Types.KeySource.keyFilename = f
|
||||
, Types.KeySource.contentLocation = f
|
||||
, Types.KeySource.inodeCache = Nothing
|
||||
}
|
||||
go = Types.Backend.getKey b ks Utility.Metered.nullMeterUpdate
|
||||
ks = Types.KeySource.KeySource
|
||||
{ Types.KeySource.keyFilename = f
|
||||
, Types.KeySource.contentLocation = f
|
||||
, Types.KeySource.inodeCache = Nothing
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue