I can't get content referenced in a dead repo to be considered unused.
Setup:
- Make repo A and B, connect them
- Add file to A, copy to B, sync
- Sync B
- Mark A dead
- Delete symlink from B
- Run git-annex forget --drop-dead on B
- Run git-annex unused on B
The file does not appear as unused. Am I doing something wrong or is this genuinely impossible?
I can understand the reasons for not wanting it to work this way in case the dead repo had important files, but what this means is files I genuinely want to drop will never be considered unused if they existed in the dead repo. This could create an issue for me if I lose a repo in one of my very large annexes, because that could mean gigs of wasted space. I rely on unused to safely drop content because the drop command may remove files that are still referenced somewhere else (duplicate symlinks).
A file is not considered unused until there are no git branches that still refer to that file.
When you delete the symlink in step 5, you don't say you commit it, so the master branch still refers to the file; it's not unused.
Also, you have A as a remote of B still. So git still has a tracking branch, remotes/A/master, that still contains the file. So the file is still considered in use because of that.
I think you'll probably also have a synced/master branch that contains the file too, at least until you sync with some other repository, or delete the branch. Arguably that's an implementation detail of git-annex and perhaps it should not consider those branches when checking for branches that contain a file.