git-annex/Database
Joey Hess 675556fd9a
smudge: check for known annexed inodes before checking annex.largefiles
smudge: Fix a case where an unlocked annexed file that annex.largefiles
does not match could get its unchanged content checked into git, due to git
running the smudge filter unecessarily.

When the file has the same inodecache as an already annexed file,
we can assume that the user is not intending to change how it's stored in
git.

Note that checkunchangedgitfile already handled the inverse case, where the
file was added to git previously. That goes further and actually sha1
hashes the new file and checks if it's the same hash in the index.

It would be possible to generate a key for the file and see if it's the
same as the old key, however that could be considerably more expensive than
sha1 of a small file is, and it is not necessary for the case I have, at
least, where the file is not modified or touched, and so its inode will
match the cache.

git-annex add was changed, when adding a small file, to remove the inode
cache for it. This is necessary to keep the recipe in
doc/tips/largefiles.mdwn for converting from annex to git working.
It also avoids bugs/case_where_using_pathspec_with_git-commit_leaves_s.mdwn
which the earlier try at this change introduced.
2021-05-10 13:20:10 -04:00
..
Keys smudge: check for known annexed inodes before checking annex.largefiles 2021-05-10 13:20:10 -04:00
Benchmark.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
ContentIdentifier.hs remove ContentIndentifiersCidRemoteIndex uniqueness constraint 2020-12-23 14:03:33 -04:00
Export.hs use GIT keys for export of non-annexed files 2021-03-05 14:12:11 -04:00
Fsck.hs enable extensions needed by new version of persistent 2020-11-07 14:09:17 -04:00
Handle.hs Fix build with persistent-2.12.0.1 2021-04-01 12:21:02 -04:00
Init.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
Keys.hs smudge: check for known annexed inodes before checking annex.largefiles 2021-05-10 13:20:10 -04:00
Queue.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
Types.hs started converting Ref from String to ByteString 2020-04-06 17:14:49 -04:00