support pointer files
authorJoey Hess <joeyh@joeyh.name>
Mon, 7 Dec 2015 19:22:01 +0000 (15:22 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 7 Dec 2015 19:35:36 +0000 (15:35 -0400)
commit664cc987e806800ef46794f356003321170c1060
treea352081605262c79f6bbd80ccd752fcd20252e2c
parent2cbcb4f1a8e131ec532ce379d8fcdd63f7faa23e
support pointer files

Backend.lookupFile is changed to always fall back to catKey when
operating on a file that's not a symlink.

catKey is changed to understand pointer files, as well as annex symlinks.

Before, catKey needed a file mode witness, to be sure it was looking at a
symlink. That was complicated stuff. Now, it doesn't actually care if a
file in git is a symlink or not; in either case asking git for the content
of the file will get the pointer to the key.

This does mean that git-annex will treat a link
foo -> WORM--bar as a git-annex file, and also treats
a regular file containing annex/objects/WORM--bar as a git-annex file.

Calling catKey could make git-annex commands need to do more work than
before. This would especially be the case if a repo contained many regular
files, and only a few annexed files, as now git-annex will need to ask
git about the contents of the regular files.
Annex/AutoMerge.hs
Annex/CatFile.hs
Annex/Direct.hs
Annex/View.hs
Backend.hs
CmdLine/Seek.hs
Command/Indirect.hs
Command/Smudge.hs
Command/Undo.hs