Commit graph

24 commits

Author SHA1 Message Date
Joey Hess
547d7745fb 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.
2013-02-06 12:44:19 -04:00
Joey Hess
af3a25ee03 Deal with stale mappings for deleted file in direct mode.
The most common way for a mapping to be stale is when a file was deleted,
or renamed. Nothing updates the mappings for deletions yet.
But they can also become stale in other ways. For example a file can
be modified.

So, the mapping is not trusted to be consistent. When we get a key,
only replace symlinks that still point to that key with its content.
When we drop a key, only put back symlinks for files that still have
the direct mode content.
2013-02-05 16:48:00 -04:00
Joey Hess
18a6935e42 safe recv-key in direct mode
Checks the key's size and checksum. This is sorta expensive, but it avoids
needing to add another round-trip to the protocol.
2013-01-11 16:03:45 -04:00
Joey Hess
043c9562f3 tested some cases 2013-01-11 14:59:43 -04:00
Joey Hess
3621482c53 update 2013-01-10 13:14:02 -04:00
Joey Hess
5f6c33e50c thoughts on safer direct mode transfers 2013-01-08 13:44:38 -04:00
Joey Hess
c0ffa8f6f0 update 2012-12-29 15:23:11 -04:00
Joey Hess
dde219dc95 update 2012-12-25 16:19:03 -04:00
Joey Hess
8a8380f1b7 use sync command merge engine in assistant
To handle direct mode merging.
2012-12-25 14:10:07 -04:00
Joey Hess
62e15d824c update 2012-12-19 12:47:23 -04:00
Joey Hess
0abf4b3c0a update 2012-12-18 15:07:35 -04:00
Joey Hess
40fa6936e4 Merge branch 'master' into desymlink
Conflicts:
	debian/changelog
	doc/design/assistant/desymlink.mdwn
2012-12-17 13:29:10 -04:00
Joey Hess
64993f64bf update 2012-12-13 16:09:25 -04:00
Joey Hess
b080a58b76 Merge branch 'master' into desymlink
Conflicts:
	Annex/CatFile.hs
	Annex/Content.hs
	Git/LsFiles.hs
	Git/LsTree.hs
2012-12-13 00:29:06 -04:00
Joey Hess
d4bd8fdd63 update 2012-12-12 19:31:31 -04:00
Joey Hess
eccfc69f04 Merge branch 'master' into desymlink 2012-12-10 14:47:30 -04:00
Joey Hess
3539105637 update list of things TODO to make git annex sync work in direct mode 2012-12-10 14:47:11 -04:00
Joey Hess
6dfb1cd9a0 Merge branch 'master' into desymlink 2012-12-10 12:20:33 -04:00
Joey Hess
81b19b18de update 2012-12-08 17:05:05 -04:00
Joey Hess
ef24751922 support for checking presence of objects in direct mode
Also for dropping objects in direct mode.

Checking presence reliably needs a cache of mtime, size, and inode.
This way, if a file is modified, keys that point to it are no longer
present.

Also, the code for restoring the symlink when removing objects is
unnecessarily messy. calcGitLink was generating links starting with
"../../remote/.git/", when running "git annex move --from remote".
I put in a workaround, but calcGitLink should probably be fixed.

There is not yet support for getting objects from repositories in direct
mode; it still looks for content in .git/annex/objects, and there's no
once place I can change to fix that.

Also, getting objects from direct mode repositories is problematic since
the can be changed while the object is being transferred. It probably needs
to quarantine it first.
2012-12-07 17:29:55 -04:00
Joey Hess
fca19fe58b worked out more design 2012-12-04 17:52:23 -04:00
Øyvind A. Holm
258ed550a5 doc/design/assistant/desymlink.mdwn: Typo fix
problimatic → problematic.

827d0750-3b1b-11e2-ac67-00c0a8deee11
2012-11-30 19:26:15 +01:00
Joey Hess
2faa2cdf00 update 2012-10-04 20:38:39 -04:00
Joey Hess
76720a6d0d update 2012-05-26 21:38:25 -04:00