6869e6023e
The only fully supported thing is to have the main repository on one disk, and .git/annex on another. Only commands that move data in/out of the annex will need to copy it across devices. There is only partial support for putting arbitrary subdirectories of .git/annex on different devices. For one thing, but this can require more copies to be done. For example, when .git/annex/tmp is on one device, and .git/annex/journal on another, every journal write involves a call to mv(1). Also, there are a few places that make hard links between various subdirectories of .git/annex with createLink, that are not handled. In the common case without cross-device, the new moveFile is actually faster than renameFile, avoiding an unncessary stat to check that a file (not a directory) is being moved. Of course if a cross-device move is needed, it is as slow as mv(1) of the data.
26 lines
729 B
Haskell
26 lines
729 B
Haskell
module Common (module X) where
|
|
|
|
import Control.Monad as X hiding (join)
|
|
import Control.Applicative as X
|
|
import Control.Monad.State as X (liftIO)
|
|
import Control.Exception.Extensible as X (IOException)
|
|
|
|
import Data.Maybe as X
|
|
import Data.List as X
|
|
import Data.String.Utils as X
|
|
|
|
import System.Path as X
|
|
import System.FilePath as X
|
|
import System.Directory as X
|
|
import System.Cmd.Utils as X hiding (safeSystem)
|
|
import System.IO as X hiding (FilePath)
|
|
import System.Posix.Files as X
|
|
import System.Posix.IO as X
|
|
import System.Posix.Process as X hiding (executeFile)
|
|
import System.Exit as X
|
|
|
|
import Utility.Misc as X
|
|
import Utility.Conditional as X
|
|
import Utility.SafeCommand as X
|
|
import Utility.Path as X
|
|
import Utility.Directory as X
|