early cancelation of transfer that annex.securehashesonly prohibits
authorJoey Hess <joeyh@joeyh.name>
Mon, 27 Feb 2017 19:21:24 +0000 (15:21 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 27 Feb 2017 19:21:24 +0000 (15:21 -0400)
commitc33363dfa7b82dbf5788466b0988454b248f1fb4
treec20af54af907ad85cb9bf64e87488fd6f0b130a5
parent9db064f50c1c88107090c98255b85a7c20dc99e3
early cancelation of transfer that annex.securehashesonly prohibits

This avoids sending all the data to a remote, only to have it reject it
because it has annex.securehashesonly set. It assumes that local and
remote will have the same annex.securehashesonly setting in most cases.
If a remote does not have that set, and local does, the remote won't get
some content it would otherwise accept.

Also avoids downloading data that will not be added to the local object
store due to annex.securehashesonly.

Note that, while encrypted special remotes use a GPGHMAC key variety,
which is not collisiton resistent, Transfers are not used for such
keys, so this check is avoided. Which is what we want, so encrypted
special remotes still work.

This commit was sponsored by Ewen McNeill.
Annex/Transfer.hs