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:
Joey Hess 2024-08-04 11:58:07 -04:00
parent 6b63449133
commit a3d96474f2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 45 additions and 25 deletions

View file

@ -408,10 +408,7 @@ adjustExportImport' isexport isimport annexobjects r rs gc = do
k loc
=<< getkeycids ciddbv k
-- For annexobjects=true, objects are stored in the remote
-- in a location under .git/objects/
annexobjectlocation k = mkExportLocation $
".git" P.</> annexLocation gc k hashDirLower
annexobjectlocation k = exportAnnexObjectLocation gc k
checkpresentannexobject k =
checkPresentExport (exportActions r) k (annexobjectlocation k)