When I was checking out disk usage on my home directory, I noticed a bunch of files stored in .git/annex/tmp under their own filenames, rather than in .git/annex/objects. Checking a couple, they seem to be redundant with stuff in .git/annex/objects.
Is there any way to clean that stuff up? Will the assistant eventually clean it up?
Thanks!
git annex unused
to clean them up. The assistant doesn't yet explicitly clean these up, but it does keep retrying (and when possible, resuming) failed downloads until they succeed, at which point the temp file is moved into the objects directory.that's odd... these files are on my client machine, and shouldn't be downloaded from anywhere, just uploaded to other places. There are lots and lots of them.
git-annex unused only found two files, and there are dozens and dozens of these files in my .git/annex/tmp directory.
Would it be safe to delete them by hand?
(The only thing I can think of that might e relevant is, some of these have definitely been moved from place to place within my repo. I use "git mv" when I do that. Maybe I messed that up somehow, and git-annex thought they had disappeared and needed to be re-downloaded from a remote repo?)
No, moving files within the repository is unlikely to be related.
If you can show me what the filenames look like I'll have a much better chance of getting somewhere, since they do not seem to be filenames that
git annex unused
knows how to deal with, and so I don't know what they could be.They're the full actual filenames (but not directories) of particular files in my repository, sometimes with numeric suffixes (or rather, numbers before the file suffixes), like this:
746.DS_Store 747.DS_Store 748.DS_Store 749.DS_Store Birdplane87712.mp4 Birdplane87713.mp4 Bodyrock87712.mp4 Bodyrock87713.mp4 Dubstep Violin- Lindsey Stirling- Crystallize746.mp4 Dubstep Violin- Lindsey Stirling- Crystallize87712.mp4 Dubstep Violin- Lindsey Stirling- Crystallize87713.mp4 Handlebars (fan video)87712.mp4 Handlebars (fan video)87713.mp4 Handlebars (official)87712.mp4 Handlebars (official)87713.mp4
Most of them are videos, and I've moved videos around a lot in my repository, and made some mistakes doing so from time to time when I was first learning git-annex, and fooling around on the command line -- breaking symlinks and figuring out how to fix that with git-annex fix.
Oh, another stupid thing I might have done --
Might not be relevant, just trying to think of weird things I've done.
Ah, I think I know what this is. When the assistant notices a new file appear, it makes a hard link in the temp directory to the new file, and waits for it to stop being written to.
If the hard link is broken before the assistant is done adding the file to the annex, it looks like it could leave the temp file behind. I've committed a change that should avoid that.
Since some of these are OSX DS_Store files, and the rest have a strange number added (which git-annex did not do), I suspect you moved them into the annexed directory using the OSX Finder or something like that, and whatever was putting them into the directory first wrote them with the names we see here. Then, while git-annex was still processing them, they got renamed.
I'd say you can safely delete them.
I just discovered there were 30GB in this tmp directory. Here are the file names. It seems that the file names are partial (they are missing some characters: it seems most file names are missing the last 16 characters and the file extension). As I'm in dire need of disk space, I'm going to delete this files now.
Since version 5.20140517, the git-annex assistant will automatically clean up stale tmp files on startup.
If not using the assistant, you can do it yourself..
So far, all the tmp files people have been kind enough to share the details about with me seem to be created by the assistant when it locks a file down. I know this can result in dangling files if the computer is rebooted while the assistant is in the middle of doing that.