From 8c6099d73c86f8803f08c47fe224cf8398cfd6c2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 26 Feb 2014 16:52:56 -0400 Subject: Put non-object tmp files in .git/annex/misctmp, leaving .git/annex/tmp for only partially transferred objects. This allows eg, putting .git/annex/tmp on a ram disk, if the disk IO of temp object files is too annoying (and if you don't want to keep partially transferred objects across reboots). .git/annex/misctmp must be on the same filesystem as the git work tree, since files are moved to there in a way that will not work cross-device, as well as symlinked into there. I first wanted to put the tmp objects in .git/annex/objects/tmp, but that would pose transition problems on upgrade when partially transferred objects existed. git annex info does not currently show the size of .git/annex/misctemp, since it should stay small. It would also be ok to make something clean it out, periodically. --- Command/Unlock.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Command/Unlock.hs') diff --git a/Command/Unlock.hs b/Command/Unlock.hs index 9f2c257fb..4cfe39307 100644 --- a/Command/Unlock.hs +++ b/Command/Unlock.hs @@ -36,7 +36,7 @@ perform dest key = do unlessM (checkDiskSpace Nothing key 0) $ error "cannot unlock" src <- calcRepo $ gitAnnexLocation key - tmpdest <- fromRepo $ gitAnnexTmpLocation key + tmpdest <- fromRepo $ gitAnnexTmpObjectLocation key liftIO $ createDirectoryIfMissing True (parentDir tmpdest) showAction "copying" ifM (liftIO $ copyFileExternal src tmpdest) -- cgit v1.2.3