Remote.Git storeKey works with annex+http urls

Does not yet update progress meter.
This commit is contained in:
Joey Hess 2024-07-24 12:05:10 -04:00
parent 0280e2dd5e
commit b3915b88ba
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 76 additions and 48 deletions

View file

@ -42,16 +42,19 @@ store remoteuuid gc runner k af o p = do
let bwlimit = remoteAnnexBwLimitUpload gc <|> remoteAnnexBwLimit gc
metered (Just p) sizer bwlimit $ \_ p' ->
runner (P2P.put k af p') >>= \case
Just (Just fanoutuuids) -> do
-- Storing on the remote can cause it
-- to be stored on additional UUIDs,
-- so record those.
forM_ fanoutuuids $ \u ->
when (u /= remoteuuid) $
logChange k u InfoPresent
Just (Just fanoutuuids) ->
storeFanout k remoteuuid fanoutuuids
Just Nothing -> giveup "Transfer failed"
Nothing -> remoteUnavail
storeFanout :: Key -> UUID -> [UUID] -> Annex ()
storeFanout k remoteuuid us =
-- Storing on the remote can cause it to be stored on additional UUIDs,
-- so record those.
forM_ us $ \u ->
when (u /= remoteuuid) $
logChange k u InfoPresent
retrieve :: RemoteGitConfig -> (ProtoRunner (Bool, Verification)) -> Key -> AssociatedFile -> FilePath -> MeterUpdate -> VerifyConfig -> Annex Verification
retrieve gc runner k af dest p verifyconfig = do
iv <- startVerifyKeyContentIncrementally verifyconfig k