This commit is contained in:
Joey Hess 2017-05-11 13:12:51 -04:00
parent 0b5fb4699b
commit b9ffa8e1c7
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -0,0 +1,22 @@
[[!comment format=mdwn
username="joey"
subject="""comment 3"""
date="2017-05-11T17:06:23Z"
content="""
The reason `git annex unlock` is slow is because it makes a copy
of the entire file. The file is left as-is in the annex so the
old version is available later, and the unlocked copy is made available for
modification.
More recent versions of git-annex support v6 mode, which has a annex.thin
configuration that makes `git annex unlock` not do this copy, so it's very
fast. But then no copy of the old version of the file will be made,
and so you won't be able to revert to the old version. Which seems to be
an important part of your workflow.
Another way to make `git annex unlock` fast is to use a file system that
supports Copy On Write (CoW). git-annex will use CoW automatically when
available, and then unlocking doesn't need to actually copy the file,
but the old version will still be preserved. Btrfs is the only filesystem
I know of that supports CoW, although there may be others.
"""]]