From 0dc064a9ad6e1d6abbc84e71d8e7007d042b1f4d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 29 Jul 2024 11:18:03 -0400 Subject: [PATCH] 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. --- Annex/Proxy.hs | 8 +------- CHANGELOG | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Annex/Proxy.hs b/Annex/Proxy.hs index 854ce289e2..16d4fc2cdd 100644 --- a/Annex/Proxy.hs +++ b/Annex/Proxy.hs @@ -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 diff --git a/CHANGELOG b/CHANGELOG index db33d0ba37..b84c2e9f29 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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.