If a git-annex repo is copied (e.g. by creating an AWS volume from a snapshot), there is a possibility of different repo copies with the same UUID. It would help if there was an option to git-annex-reinit
that would create a new uuid for the current repo.
You can unset annex.uuid and then re-run
git annex init
. Will work ok.You would probably also want to run
git annex fsck --fast
so that any annexed content in the repo gets recorded as being present in the new uuid.This takes very long on my repo, even with
--fast
. Maybe, there's a way to make a fast dedicated command for this scenario? Or, a version of ?sameas which represents the fact that all presence info in this repo up to this timestamp is same as in old repo, but from that point on this repo is separate?I don't want to complicate the location logs with time-dependent sameas hacks.
Is this repo that's been copied a special remote? fsck --fast --from would then not be very fast since it has to talk to the special remote. A dedicated command could be faster than that.
If the repo is a git-annex repo though, I'd expect git annex fsck --fast to be nearly optimal, the only extra work it does over such a dedicated command, I think, is a stat of the object file to check if it's present.
See ?reinit should work without arguments for another argument for the same thing.