Let's suppose that I've manually modified files in .git/annex/objects,
for example I ran an rsync or some other file synchronization software
to copy files. As a result, some objects have disappeared, others have
appeared. After that git annex whereis .' displays stale information,
it doesn't take the manual modifications to accound.
git annex fsck'
seems to fix this, but it runs the rehashing of all new files, so it's
slow. Is there a fast alternative, which notices all the object file
changes, trusts them, and just updates .git/annex/index quickly?
I do not recommend manually messing with the contents of .git/annex/objects. It is a good way to lose data.
If you look at the documentation for fsck in git-annex's man page, you will find the answer to your question.
Joey,
I have sometimes experienced that there is way too much content in the
.git/annex/objects
folder. For instance, my terminal emulator recently crashed during a sync which seemed to create a lot of folders.In the annex repo where this happened I now got way too many folders (annex sometimes complain about no. of inodes or something like that) and I don't know how to clean it correctly.
Here's a "screenshot":
This is a
direct
-mode repo. With.git/objectcts
I can usegit gc
. How can I tell annex to tidy up? I have triedfsck
,repair
andforget
.Any hints on how to deal with this? Other than manually clean up by deleting
.git/annex/objects
and rerunningfsck
?git annex fsck --fast
.)I'm not convinced yet that anything is wrong, or that there's anything you can do to improve matters. In any case, see ?wishlist: pack metadata in direct mode.