I am just beginning to use git-annex so it is possible that the following issue was caused by my own mistake. It cropped up after commiting a number of files that had been moved between subfolders, and added with git add -A
etc.
When files are locked, I am able to view their contents. However, when I unlock certain files, their contents appear to be replaced by the contents of the symlink. Locking them again allows me to view their contents. For instance, with one unlocked file, say test.md
, I get
$ cat test.md
/annex/objects/SHA256E-s535--d37feb3390801b601a9cee77f6467f01aaabbb293149d20d75df26172a3594fd.md
Some files still behave as expected.
My git-annex repo is in my Linux home folder on an ext4 partition. My repo uses git-annex version 6.
I did have a look at this discussion but none of the solutions there seemed to do the trick.
Any help is much appreciated.
Please note that repository version 6, which you are using, is still experimental, it has known bugs and probably unknown bugs.
I think this is an unknown bug, probably something has gotten inconsistent in the keys database and it doesn't realize it has the content.
I found one way to cause this, filed a bug: ?v6 unlock confused by touch
Joey, thanks for the response, not to mention also for this brilliant piece of software. I understand version 6 still being experimental.
Do you have any thoughts on how I can repair my repository at this point so that unlocking files gives me back their contents?
Did you try Joey's suggestion? “Another way to get out of this situation would be to edit the files, and remove the initial lines so it contains a single line that is the link target of the symlink (the bit with .git/annex/objects in it). Then, git annex fsck would be able to fix up the files.”
What is the output of
readlink test.md
when test.md is locked?