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
|
@ -13,6 +13,7 @@ import Types.Backend
|
|||
import Types.KeySource
|
||||
import Backend.Utilities
|
||||
import Git.FilePath
|
||||
import Utility.Metered
|
||||
|
||||
import qualified Data.ByteString.Char8 as S8
|
||||
|
||||
|
@ -32,8 +33,8 @@ backend = Backend
|
|||
{- The key includes the file size, modification time, and the
|
||||
- original filename relative to the top of the git repository.
|
||||
-}
|
||||
keyValue :: KeySource -> Annex (Maybe Key)
|
||||
keyValue source = do
|
||||
keyValue :: KeySource -> MeterUpdate -> Annex (Maybe Key)
|
||||
keyValue source _ = do
|
||||
let f = contentLocation source
|
||||
stat <- liftIO $ getFileStatus f
|
||||
sz <- liftIO $ getFileSize' f stat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue