I recently started experimenting with git annex, adding files that I've had
floating across several computers to repositories. During the testing I had
a few occasions where I wrecked a repository somehow, and decided to wipe it
and start anew (at this point there was no important files in them so I thought
this is the easiest way). Well, as it turns out this interacts badly with location
tracking, since now git annex whereis
shows files residing in all those destroyed
repositories, all having same names as some existing repositories. This makes it hard
to follow whether a repo actually has a file, or was the file only seen in some dead
repo with the same name.
I planned on cleaning this up by looking up the UUIDs of the now stable, existing
repos and untrusting all the dead copies (they should effectively disappear from
git annex´s output then, right?), but I didn't find an easy way to look up the UUID
of the current repository (maybe this could be included in git annex status
?)
I also noticed that untrust cannot remove the trust based on the UUID -- if I try
it I simply get "there is no git remote named "11908472-...", so I guess untrust
works with git remote names, which I find a bit confusing, since trust.log logs the
trust levels based on the UUID. I could just write into trust.log manually, but I'm
unsure how the changes would get propagated.
What should I do? As a related wishlist item I would ask for some additional mechanisms for purging known-dead repositories from the location tracking database. And the ability to look up the UUID of the current repo, and to use the UUID to specify repositories when applicable (untrust and describe maybe).
Specifying the UUID was supposed to work, I think I broke it a while ago. Fixed now in git.
I'm not sure why you need to look up the UUID of the current repository. You can always refer to the current repository as ".". Anyway, the UUID of the current repository is in
.git/config
, or usegit config annex.uuid
.Thanks for the quick reply
I wanted to look up the UUID of the current repo so that I can find out which repo is alive from the collection of repos with the same name. I could have looked for it in .git/config though, since it's pretty obvious. I just looked into the git-annex branch and didn't find it there. Thanks for the tip about using ".". By the way, could there be some kind of warning about using non-unique names for repos? That would make this scenario less likely. Or maybe that is a bad idea given the decentralized nature of git.
By the way, do the trust settings propagate to other repos? If I mark some UUID as untrusted on one computer does it become globally untrusted?
git annex status
now includes a list of all known repositories.Yes, trust setting propigate on git push/pull like any other git-annex information.