in unexport, check for annexobjects presence before updating location log

The key may still be in the annexobjects location.
This commit is contained in:
Joey Hess 2024-08-02 18:43:10 -04:00
parent 069d90eab5
commit c4352adf6a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 17 additions and 6 deletions

View file

@ -67,12 +67,13 @@ exporttree=yes special remote R.
* A exports tree T1 to R
* B pulls from A, so knows R has tree T1
* A exports tree T2 to R, which deletes file `foo`. So
it is moved to R's .git/annex/objects/
it is moved to R's .git/annex/objects. Or, alternatively,
`foo` is deleted, and the key is then copied to R again,
also to .git/annex/objects.
* B exports tree T2 to R also. So B deletes file `foo`. But it was not
present anyway. If B then marks the key as not present in R, we will have
lost track of the fact that A moved it to the objects location.
So, when calling removeExport, have to also check if the key is present in
the objects location. If so, don't record the key as missing. (Or course,
it already checks if some other exported file also has the content of the
key.)
the objects location. If so, either don't record the key as missing, or
also remove from the objects location.