diff --git a/Annex/CopyFile.hs b/Annex/CopyFile.hs index 07f389995e..8eade94068 100644 --- a/Annex/CopyFile.hs +++ b/Annex/CopyFile.hs @@ -25,15 +25,6 @@ import Data.Time.Clock.POSIX -- Copies from src to dest, updating a meter. If the copy finishes -- successfully, calls a final check action, which must also succeed, or -- returns false. --- --- If either the remote or local repository wants to use hard links, --- the copier will do so (falling back to copying if a hard link cannot be --- made). --- --- When a hard link is created, returns Verified; the repo being linked --- from is implicitly trusted, so no expensive verification needs to be --- done. Also returns Verified if the key's content is verified while --- copying it. type FileCopier = FilePath -> FilePath -> Key -> MeterUpdate -> Annex Bool -> VerifyConfig -> Annex (Bool, Verification) -- To avoid the overhead of trying copy-on-write every time, it's tried diff --git a/Remote/Git.hs b/Remote/Git.hs index 37d009d3f1..c6d18289aa 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -839,6 +839,14 @@ wantHardLink = (annexHardLink <$> Annex.getGitConfig) -- because they can be modified at any time. <&&> (not <$> annexThin <$> Annex.getGitConfig) +-- If either the remote or local repository wants to use hard links, +-- the copier will do so (falling back to copying if a hard link cannot be +-- made). +-- +-- When a hard link is created, returns Verified; the repo being linked +-- from is implicitly trusted, so no expensive verification needs to be +-- done. Also returns Verified if the key's content is verified while +-- copying it. mkFileCopier :: Bool -> State -> Annex FileCopier mkFileCopier remotewanthardlink (State _ _ copycowtried _ _) = do let copier = fileCopier copycowtried