From 3905053a18011eb92f00754cb1f7e5331370e2ce Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 19 Nov 2011 15:16:38 -0400 Subject: update comment to explain non-obvious temp file --- Command/Migrate.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Command/Migrate.hs b/Command/Migrate.hs index 045b8f9b1..7a329080f 100644 --- a/Command/Migrate.hs +++ b/Command/Migrate.hs @@ -39,12 +39,16 @@ start b file (key, oldbackend) = do upgradableKey :: Key -> Bool upgradableKey key = isNothing $ Types.Key.keySize key +{- Store the old backend's key in the new backend + - The old backend's key is not dropped from it, because there may + - be other files still pointing at that key. + - + - Use the same filename as the file for the temp file name, to support + - backends that allow the filename to influence the keys they + - generate. + -} perform :: FilePath -> Key -> Backend Annex -> CommandPerform perform file oldkey newbackend = do - -- Store the old backend's cached key in the new backend - -- (the file can't be stored as usual, because it's already a symlink). - -- The old backend's key is not dropped from it, because there may - -- be other files still pointing at that key. src <- fromRepo $ gitAnnexLocation oldkey tmp <- fromRepo gitAnnexTmpDir let tmpfile = tmp takeFileName file -- cgit v1.2.3