rename to annexobjects location on unexport
This avoids needing to re-upload the file again to get it to the annexobjects location, which git-annex sync was doing when it was preferred content. If the file is not preferred content, sync will drop it from the annexobjects location. If the file has been deleted from the tree, it will remain in the annexobjects location until an unused/dropunused pass is done.
This commit is contained in:
parent
6b63449133
commit
a3d96474f2
4 changed files with 45 additions and 25 deletions
|
@ -28,6 +28,7 @@ module Annex.Locations (
|
|||
annexLocationsBare,
|
||||
annexLocationsNonBare,
|
||||
annexLocation,
|
||||
exportAnnexObjectLocation,
|
||||
gitAnnexDir,
|
||||
gitAnnexObjectDir,
|
||||
gitAnnexTmpOtherDir,
|
||||
|
@ -122,6 +123,7 @@ import Types.UUID
|
|||
import Types.GitConfig
|
||||
import Types.Difference
|
||||
import Types.BranchState
|
||||
import Types.Export
|
||||
import qualified Git
|
||||
import qualified Git.Types as Git
|
||||
import Git.FilePath
|
||||
|
@ -170,6 +172,13 @@ annexLocationsBare config key =
|
|||
annexLocation :: GitConfig -> Key -> (HashLevels -> Hasher) -> RawFilePath
|
||||
annexLocation config key hasher = objectDir P.</> keyPath key (hasher $ objectHashLevels config)
|
||||
|
||||
{- For exportree remotes with annexobjects=true, objects are stored
|
||||
- in this location as well as in the exported tree. -}
|
||||
exportAnnexObjectLocation :: GitConfig -> Key -> ExportLocation
|
||||
exportAnnexObjectLocation gc k =
|
||||
mkExportLocation $
|
||||
".git" P.</> annexLocation gc k hashDirLower
|
||||
|
||||
{- Number of subdirectories from the gitAnnexObjectDir
|
||||
- to the gitAnnexLocation. -}
|
||||
gitAnnexLocationDepth :: GitConfig -> Int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue