diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-12-09 18:13:31 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-12-09 18:13:31 -0400 |
commit | a53c6c6b826ff32d3da7e0e680d724d66b46ea8f (patch) | |
tree | af64996212b37fd94008c144f27f69737710772c /doc | |
parent | 24edbdd707afafd5579c7e3e0de3dae72e73b881 (diff) |
devblog
Diffstat (limited to 'doc')
-rw-r--r-- | doc/devblog/day_343__get_and_drop_for_smudge.mdwn | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/devblog/day_343__get_and_drop_for_smudge.mdwn b/doc/devblog/day_343__get_and_drop_for_smudge.mdwn new file mode 100644 index 000000000..50046ac08 --- /dev/null +++ b/doc/devblog/day_343__get_and_drop_for_smudge.mdwn @@ -0,0 +1,26 @@ +Well, another day working on smudge filters, or unlocked files as the +feature will be known when it's ready. Got both `git annex get` and `git +annex drop` working for these files today. + +Get was the easy part; it just has to hard link or copy the object to the +work tree file(s) that point to it. + +Handling dropping was hard. If the user drops a file, but it's unlocked and +modified, it shouldn't reset it to the pointer file. For this, I reused the +InodeCache stuff that was built for direct mode. So the sqlite database +tracks the InodeCaches of unlocked files, and when a key is dropped it can +check if the file is modified. + +But that's not a complete solution, because when git uses a clean filter, +it will write the file itself, and git-annex won't have an InodeCache for +it. To handle this case, git-annex will fall back to verifying the content +of the file when dropping it if its InodeCache isn't known. +Bit of a shame to need an expensive checksum to drop an unlocked file; +maybe the git clean filter interface will eventually be improved to let +git-annex use it more efficiently. + +Anyway, smudged aka unlocked files are working now well enough to be a +proof of concept. I have several missing safety checks that need to be +added to get the implementation to be really correct, and quite a lot +of polishing still to do, including making `unlock`, `lock`, `fsck`, +and `merge` handle them, and finishing repository upgrade code. |