remove objectDir'
This commit is contained in:
parent
f80ec74128
commit
95a04920cf
4 changed files with 9 additions and 13 deletions
|
@ -362,7 +362,7 @@ parseLinkTargetOrPointerLazy' b =
|
|||
formatPointer :: Key -> S.ByteString
|
||||
formatPointer k = prefix <> keyFile k <> nl
|
||||
where
|
||||
prefix = toInternalGitPath $ P.pathSeparator `S.cons` objectDir'
|
||||
prefix = toInternalGitPath $ P.pathSeparator `S.cons` objectDir
|
||||
nl = S8.singleton '\n'
|
||||
|
||||
{- Maximum size of a file that could be a pointer to a key.
|
||||
|
@ -430,7 +430,7 @@ isLinkToAnnex s = p `S.isInfixOf` s
|
|||
|| p' `S.isInfixOf` s
|
||||
#endif
|
||||
where
|
||||
p = P.pathSeparator `S.cons` objectDir'
|
||||
p = P.pathSeparator `S.cons` objectDir
|
||||
#ifdef mingw32_HOST_OS
|
||||
p' = toInternalGitPath p
|
||||
#endif
|
||||
|
|
|
@ -14,7 +14,6 @@ module Annex.Locations (
|
|||
keyPath,
|
||||
annexDir,
|
||||
objectDir,
|
||||
objectDir',
|
||||
gitAnnexLocation,
|
||||
gitAnnexLocation',
|
||||
gitAnnexLocationDepth,
|
||||
|
@ -133,11 +132,8 @@ annexDir = P.addTrailingPathSeparator "annex"
|
|||
|
||||
{- The directory git annex uses for locally available object content,
|
||||
- relative to the .git directory -}
|
||||
objectDir :: FilePath
|
||||
objectDir = fromRawFilePath objectDir'
|
||||
|
||||
objectDir' :: RawFilePath
|
||||
objectDir' = P.addTrailingPathSeparator $ annexDir P.</> "objects"
|
||||
objectDir :: RawFilePath
|
||||
objectDir = P.addTrailingPathSeparator $ annexDir P.</> "objects"
|
||||
|
||||
{- Annexed file's possible locations relative to the .git directory
|
||||
- in a non-bare repository.
|
||||
|
@ -155,7 +151,7 @@ annexLocationsBare config key =
|
|||
map (annexLocation config key) [hashDirLower, hashDirMixed]
|
||||
|
||||
annexLocation :: GitConfig -> Key -> (HashLevels -> Hasher) -> RawFilePath
|
||||
annexLocation config key hasher = objectDir' P.</> keyPath key (hasher $ objectHashLevels config)
|
||||
annexLocation config key hasher = objectDir P.</> keyPath key (hasher $ objectHashLevels config)
|
||||
|
||||
{- Number of subdirectories from the gitAnnexObjectDir
|
||||
- to the gitAnnexLocation. -}
|
||||
|
@ -268,7 +264,7 @@ gitAnnexDir r = P.addTrailingPathSeparator $ Git.localGitDir r P.</> annexDir
|
|||
{- The part of the annex directory where file contents are stored. -}
|
||||
gitAnnexObjectDir :: Git.Repo -> RawFilePath
|
||||
gitAnnexObjectDir r = P.addTrailingPathSeparator $
|
||||
Git.localGitDir r P.</> objectDir'
|
||||
Git.localGitDir r P.</> objectDir
|
||||
|
||||
{- .git/annex/tmp/ is used for temp files for key's contents -}
|
||||
gitAnnexTmpObjectDir :: Git.Repo -> RawFilePath
|
||||
|
|
|
@ -337,7 +337,7 @@ reconcileStaged qh = unlessM (Git.Config.isBare <$> gitRepo) $ do
|
|||
-- a non-pointer file will match this. This is only a
|
||||
-- prefilter so that's ok.
|
||||
, Param $ "-G" ++ fromRawFilePath (toInternalGitPath $
|
||||
P.pathSeparator `S.cons` objectDir')
|
||||
P.pathSeparator `S.cons` objectDir)
|
||||
-- Disable rename detection.
|
||||
, Param "--no-renames"
|
||||
-- Avoid other complications.
|
||||
|
|
|
@ -303,7 +303,7 @@ setupRepo gcryptid r
|
|||
- which is needed for rsync of objects to it to work.
|
||||
-}
|
||||
rsyncsetup = Remote.Rsync.withRsyncScratchDir $ \tmp -> do
|
||||
createAnnexDirectory (toRawFilePath (tmp </> objectDir))
|
||||
createAnnexDirectory (toRawFilePath tmp P.</> objectDir)
|
||||
dummycfg <- liftIO dummyRemoteGitConfig
|
||||
let (rsynctransport, rsyncurl, _) = rsyncTransport r dummycfg
|
||||
let tmpconfig = tmp </> "config"
|
||||
|
@ -467,7 +467,7 @@ checkKey' repo r rsyncopts accessmethod k
|
|||
{- Annexed objects are hashed using lower-case directories for max
|
||||
- portability. -}
|
||||
gCryptLocation :: Git.Repo -> Key -> FilePath
|
||||
gCryptLocation repo key = Git.repoLocation repo </> objectDir
|
||||
gCryptLocation repo key = Git.repoLocation repo </> fromRawFilePath objectDir
|
||||
</> fromRawFilePath (keyPath key (hashDirLower def))
|
||||
|
||||
data AccessMethod = AccessRsyncOverSsh | AccessGitAnnexShell
|
||||
|
|
Loading…
Add table
Reference in a new issue