summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-02-26 16:52:56 -0400
committerJoey Hess <joey@kitenet.net>2014-02-26 16:52:56 -0400
commita1432bce2f404d032953a038a910d4bdedf92430 (patch)
treeb5072a1547fb659d77c33900b1d4f2082372dc72 /Command/Add.hs
parenta19ad12018044b943177937d9bc20e62b9569dcc (diff)
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.
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index ea4933748b..3361a430aa 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -96,7 +96,7 @@ lockDown :: FilePath -> Annex (Maybe KeySource)
lockDown file = ifM crippledFileSystem
( liftIO $ catchMaybeIO nohardlink
, do
- tmp <- fromRepo gitAnnexTmpDir
+ tmp <- fromRepo gitAnnexTmpMiscDir
createAnnexDirectory tmp
eitherToMaybe <$> tryAnnexIO (go tmp)
)