working toward git-remote-annex using a special remote
Not quite there yet. Also, changed the format of GITBUNDLE keys to use only one '-' after the UUID. A sha256 does not contain that character, so can just split at the last one. Amusingly, the sha256 will probably not actually be verified. A git bundle contains its own checksums that git uses to verify it. And if someone wanted to replace the content of a GITBUNDLE object, they could just edit the manifest to use a new one whose sha256 does verify. Sponsored-by: Nicholas Golder-Manning
This commit is contained in:
parent
f4ba6e0c1e
commit
483887591d
3 changed files with 115 additions and 29 deletions
|
@ -38,6 +38,7 @@ import Utility.CopyFile
|
|||
import Git.FilePath
|
||||
import Utility.PID
|
||||
import Utility.InodeCache
|
||||
import Utility.Metered
|
||||
import Annex.InodeSentinal
|
||||
import qualified Database.Keys
|
||||
import qualified Database.Fsck as FsckDb
|
||||
|
@ -206,8 +207,7 @@ performRemote key afile numcopies remote =
|
|||
)
|
||||
, return Nothing
|
||||
)
|
||||
getfile' tmp = Remote.retrieveKeyFile remote key (AssociatedFile Nothing) (fromRawFilePath tmp) dummymeter (RemoteVerify remote)
|
||||
dummymeter _ = noop
|
||||
getfile' tmp = Remote.retrieveKeyFile remote key (AssociatedFile Nothing) (fromRawFilePath tmp) nullMeterUpdate (RemoteVerify remote)
|
||||
getcheap tmp = case Remote.retrieveKeyFileCheap remote of
|
||||
Just a -> isRight <$> tryNonAsync (a key afile (fromRawFilePath tmp))
|
||||
Nothing -> return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue