diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-19 15:16:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-19 15:16:38 -0400 |
commit | 3905053a18011eb92f00754cb1f7e5331370e2ce (patch) | |
tree | 3bb522576f6d889d557d05aaf8f1e8f6a2a5c741 /Command | |
parent | 1b90918cec5a649d490a56d6fc8417ca623cbb6a (diff) |
update comment to explain non-obvious temp file
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Migrate.hs | 12 |
1 files 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 |