summaryrefslogtreecommitdiff
path: root/doc/design/assistant/desymlink.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-02-06 12:40:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-02-06 12:44:19 -0400
commit48d59dbad11a2f99a0003f5f3bd93734429be11d (patch)
treeef74a5cb149d78c8dc3e74732ae52f5afb73f274 /doc/design/assistant/desymlink.mdwn
parent6be68947dcf80c99ed5135c1a968641dca199555 (diff)
pre-commit: Update direct mode mappings.
Making the pre-commit hook look at git diff-index to find changed direct mode files and update the mappings works pretty well. One case where it does not work is when a file is git annex added, and then git rmed, and then this is committed. That's a no-op commit, so the hook probably doesn't even run, and it certianly never notices that the file was deleted, so the mapping will still have the original filename in it. For this and other reasons, it's important that the mappings still be treated as possibly inconsistent. Also, the assistant now allows the pre-commit hook to run when in direct mode, so the mappings also get updated there.
Diffstat (limited to 'doc/design/assistant/desymlink.mdwn')
-rw-r--r--doc/design/assistant/desymlink.mdwn12
1 files changed, 3 insertions, 9 deletions
diff --git a/doc/design/assistant/desymlink.mdwn b/doc/design/assistant/desymlink.mdwn
index 05f965358..ffa37399d 100644
--- a/doc/design/assistant/desymlink.mdwn
+++ b/doc/design/assistant/desymlink.mdwn
@@ -58,9 +58,9 @@ is converted to a real file when it becomes present.
This allows just cloning one of these repositories normally, and then
as the files are synced in, they become real files.
* Maintain a local mapping from keys to files in the tree. This is needed
- when sending/receiving keys to know what file to access. Note that a key
- can map to multiple files. And that when a file is deleted or moved, the
- mapping needs to be updated.
+ when sending/receiving/dropping keys to know what file to access.
+ Note that a key can map to multiple files. And that when a file is
+ deleted or moved, the mapping needs to be updated.
* May need a reverse mapping, from files in the tree to keys? TBD
(Currently, getting by looking up symlinks using `git cat-file`)
(Needed to make things like `git annex drop` that want to map from the
@@ -87,12 +87,6 @@ is converted to a real file when it becomes present.
* kqueue does not deliver an event when an existing file is modified.
This doesn't affect OSX, which uses FSEvents now, but it makes direct
mode assistant not 100% on other BSD's.
-* The mapping is not updated when files are deleted (or for the deletion
- part of a rename). So it can contain old filenames that are no longer in
- use. Code that uses the mapping has to take care to check that the
- files they refer to exists, which is a good idea anyway. But,
- it would be good to at some point update the mappings to remove deleted
- files (fsck does this FWIW).
## done