When proxying for a special remote, avoid unncessary hashing
Like the comment says, the client will do its own verification. But it was calling verifyKeyContentPostRetrieval, which was hashing the file.
This commit is contained in:
parent
7402ae61d9
commit
0dc064a9ad
2 changed files with 2 additions and 7 deletions
|
@ -16,7 +16,6 @@ import P2P.Proxy
|
|||
import P2P.Protocol
|
||||
import P2P.IO
|
||||
import Remote.Helper.Ssh (openP2PShellConnection', closeP2PShellConnection)
|
||||
import Annex.Content
|
||||
import Annex.Concurrent
|
||||
import Annex.Tmp
|
||||
import Logs.Proxy
|
||||
|
@ -209,12 +208,7 @@ proxySpecialRemote protoversion r ihdl ohdl owaitv oclosedv = go
|
|||
-- because the client will do its own verification.
|
||||
let vc = Remote.NoVerify
|
||||
tryNonAsync (Remote.retrieveKeyFile r k af (fromRawFilePath tmpfile) nullMeterUpdate vc) >>= \case
|
||||
Right v ->
|
||||
ifM (verifyKeyContentPostRetrieval Remote.RetrievalVerifiableKeysSecure vc v k tmpfile)
|
||||
( liftIO $ senddata offset tmpfile
|
||||
, liftIO $ sendmessage $
|
||||
ERROR "verification of content failed"
|
||||
)
|
||||
Right _ -> liftIO $ senddata offset tmpfile
|
||||
Left err -> liftIO $ propagateerror err
|
||||
|
||||
senddata (Offset offset) f = do
|
||||
|
|
|
@ -13,6 +13,7 @@ git-annex (10.20240702) UNRELEASED; urgency=medium
|
|||
* Avoid potential data loss in situations where git-annex-shell or
|
||||
git-annex remotedaemon is killed while locking a key to prevent its
|
||||
removal.
|
||||
* When proxying for a special remote, avoid unncessary hashing.
|
||||
* Added a dependency on clock.
|
||||
* Propagate --force to git-annex transferrer.
|
||||
|
||||
|
|
Loading…
Reference in a new issue