diff --git a/CHANGELOG b/CHANGELOG index c7328abf21..580d5832ad 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -26,6 +26,8 @@ git-annex (8.20210128) UNRELEASED; urgency=medium verification itself. * Checksum as content is received from a remote git-annex repository over ssh/p2p protocols, rather than doing it in a second pass. + * Bugfix: fsck --from a ssh remote did not actually check that the + content on the remote is not corrupted. -- Joey Hess Thu, 28 Jan 2021 12:34:32 -0400 diff --git a/Remote/Git.hs b/Remote/Git.hs index 0964299fa0..43255ec32d 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -184,7 +184,7 @@ gen r u rc gc rs , name = Git.repoDescribe r , storeKey = copyToRemote new st , retrieveKeyFile = copyFromRemote new st - , retrieveKeyFileCheap = copyFromRemoteCheap new st r + , retrieveKeyFileCheap = copyFromRemoteCheap st r , retrievalSecurityPolicy = RetrievalAllKeysSecure , removeKey = dropKey new st , lockContent = Just (lockKey new st) @@ -635,9 +635,9 @@ copyFromRemote'' repo forcersync r st@(State connpool _ _ _ _) key file dest met bracketIO noop (const cleanup) (const $ a feeder) `onException` liftIO forcestop -copyFromRemoteCheap :: Remote -> State -> Git.Repo -> Maybe (Key -> AssociatedFile -> FilePath -> Annex ()) +copyFromRemoteCheap :: State -> Git.Repo -> Maybe (Key -> AssociatedFile -> FilePath -> Annex ()) #ifndef mingw32_HOST_OS -copyFromRemoteCheap r st repo +copyFromRemoteCheap st repo | not $ Git.repoIsUrl repo = Just $ \key _af file -> guardUsable repo (giveup "cannot access remote") $ do gc <- getGitConfigFromState st loc <- liftIO $ gitAnnexLocation key repo gc @@ -647,11 +647,6 @@ copyFromRemoteCheap r st repo R.createSymbolicLink absloc (toRawFilePath file) , giveup "remote does not contain key" ) - | Git.repoIsSsh repo = Just $ \key af file -> - ifM (Annex.Content.preseedTmp key file) - ( void $ copyFromRemote' True r st key af file nullMeterUpdate - , giveup "cannot preseed rsync with existing content" - ) | otherwise = Nothing #else copyFromRemoteCheap _ _ _ = Nothing