git-annex/Remote
Joey Hess e95747a149
fix handling of corrupted data received from git remote
Recover from corrupted content being received from a git remote due eg to a
wire error, by deleting the temporary file when it fails to verify. This
prevents a retry from failing again.

Reversion introduced in version 8.20210903, when incremental verification
was added.

Only the git remote seems to be affected, although it is certianly
possible that other remotes could later have the same issue. This only
affects things passed to getViaTmp that return (False, UnVerified) due to
verification failing. As far as getViaTmp can tell, that could just as well
mean that the transfer failed in a way that would resume, so it cannot
delete the temp file itself. Remote.Git and P2P.Annex use getViaTmp internally,
while other remotes do not, which is why only it seems affected.

A better fix perhaps would be to improve the types of the callback
passed to getViaTmp, so that some other value could be used to indicate
the state where the transfer succeeded but verification failed.

Sponsored-by: Boyd Stephen Smith Jr.
2022-01-07 13:25:33 -04:00
..
Directory incremental hashing for fileRetriever 2021-08-13 15:43:29 -04:00
External convert Key to ShortByteString 2021-10-05 20:20:08 -04:00
Helper avoid no longer necessary piping of ssh stderr for p2pstdio 2022-01-03 12:54:40 -04:00
List auto-init autoenable=yes 2020-05-27 12:40:35 -04:00
Rsync add newtypes for QuickCheck to avoid LANG=C issues 2020-11-09 20:21:18 -04:00
WebDAV fix exporting when the file is in the top of the repo 2021-03-16 14:17:29 -04:00
Adb.hs comment 2022-01-03 13:53:34 -04:00
BitTorrent.hs incremental verification for web special remote 2021-08-18 15:02:22 -04:00
Borg.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
Bup.hs incremental verify for byteRetriever special remotes 2021-08-11 14:20:38 -04:00
Ddar.hs incremental verify for byteRetriever special remotes 2021-08-11 14:20:38 -04:00
Directory.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
External.hs improve url download failure display 2021-09-01 15:33:38 -04:00
GCrypt.hs remove git-annex-shell compat code 2021-10-11 15:36:51 -04:00
Git.hs fix handling of corrupted data received from git remote 2022-01-07 13:25:33 -04:00
GitLFS.hs git-lfs gitlab interoperability fix 2021-11-10 13:51:11 -04:00
Glacier.hs Fix build with ghc 9.0.1 2021-12-08 15:08:02 -04:00
Hook.hs incremental verify for directory special remote 2021-08-16 16:51:33 -04:00
HttpAlso.hs incremental verification for gitlfs and httpalso 2021-08-18 15:17:10 -04:00
List.hs start borg special remote 2020-12-18 16:03:51 -04:00
P2P.hs negotiate P2P protocol version for tor remotes 2021-10-11 15:58:51 -04:00
Rsync.hs incremental verify for directory special remote 2021-08-16 16:51:33 -04:00
S3.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
Tahoe.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
Web.hs improve url download failure display 2021-09-01 15:33:38 -04:00
WebDAV.hs factor out IncrementalHasher from IncrementalVerifier 2021-11-09 12:33:22 -04:00