git-annex/doc/bugs/Direct_mode_keeps_re-checksuming_duplicated_files.mdwn
Joey Hess 602baae12e Bugfix: Direct mode no longer repeatedly checksums duplicated files.
Fixed by storing a list of cached inodes for a key, instead of just one.

Backwards compatability note: An old git-annex version will fail to parse
an inode cache file that has been written by a new version, and has
multiple items. It will succees if just one. So old git-annexes will have
even worse behavior when there are duplicated files, if that is possible.
I don't think it will be a problem. (Famous last words.)

Also, note that it doesn't expire old and unused inode caches for a key.
It would be possible to add this if needed; just look through the
associated files for a key and if there are more cached inodes, throw out
any not corresponding to associated files. Unless a file is being copied
repeatedly and the old copy deleted, this lack of expiry should not be a
problem.
2013-04-06 16:07:25 -04:00

25 lines
796 B
Markdown

##What steps will reproduce the problem?
mkdir test
git init
git annex init "test"
echo "test" > a
echo "test" > b
git annex add a b
git annex sync
git annex direct
git annex sync | grep add
git annex sync | grep add
##What is the expected output? What do you see instead?
The last two syncs shouldn't need to add or checksum anything.
Firstly, the output is very confusing because the files have already been added.
Secondly, the sync can take quite a while if you have lots of duplicates or a lot of files that are incidentally similar.
##What version of git-annex are you using? On what operating system?
git-annex version: 4.20130227 on Archlinux
> [[done]]; fixed inode caching code to support multiple files for the
> same content. --[[Joey]]