* S3: Support the special case endpoint needed for the cn-north-1 region.
* Webapp: Don't list the Frankfurt region, as this (and some other new
regions) need V4 authorization which the aws library does not yet use.
+ * reinject --known: Avoid second, unncessary checksum of file.
-- Joey Hess <id@joeyh.name> Tue, 01 Nov 2016 14:02:06 -0400
| otherwise = notAnnexed src $ do
showStart "reinject" dest
next $ ifAnnexed dest
- (perform src)
+ (\key -> perform src key (verifyKeyContent DefaultVerify UnVerified key src))
stop
startSrcDest _ = error "specify a src file and a dest file"
case mkb of
Nothing -> error "Failed to generate key"
Just (key, _) -> ifM (isKnownKey key)
- ( next $ perform src key
+ ( next $ perform src key (return True)
, do
warning "Not known content; skipping"
next $ next $ return True
notAnnexed :: FilePath -> CommandStart -> CommandStart
notAnnexed src = ifAnnexed src (error $ "cannot used annexed file as src: " ++ src)
-perform :: FilePath -> Key -> CommandPerform
-perform src key = ifM move
+perform :: FilePath -> Key -> Annex Bool -> CommandPerform
+perform src key verify = ifM move
( next $ cleanup key
, error "failed"
)
where
move = checkDiskSpaceToGet key False $
- ifM (verifyKeyContent DefaultVerify UnVerified key src)
+ ifM verify
( do
moveAnnex key src
return True
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-11-07T16:02:28Z"
+ content="""
+What turns out to have been going on here is the file was first checksummed
+silently to get the key and see if it is --known,
+and then checksummed a second time (with the message displayed) as part of
+the reinject process.
+
+So, the second checksum is not needed in --known mode and I've made it not
+be done.
+
+It might be that the "(checksum)" message should be displayed during the
+intial checksum of the file. git-annex used to always say when it
+checksummed, but [[!commit 64160a96795d03ee791faa4757057200934687bc]] got
+rid of that in most cases. I guess that "reinject bigfile <13 minute wait> ok"
+is acceptable output though.
+"""]]