Is it technically possible for the metadata interface to also support regular git objects, so that committed files or directories were also subject to tagging? For most metadata-related intents and purposes it seems I’d like to treat annexed and regular files alike; so I’d like to tag the LaTeX/ReST/etc. source for a presentation the same way I treat the output PDF, only that the former are likely not annexed. In the design docs it says metadata is attached to annex keys. Could it equally be attached to git blobs and trees, or would that break horribly somewhere?
metadata can be attached to sha1 git-annex keys, which can correspond to the sha1's of git objects.
Might be worth improving this interface. A
--sha1=
would be a minor improvement.It would certianly be possible for git-annex metadata to be taught that if the file is not annexed, and is in git, to look up the sha1 of its blob object, and attach the metadata to it.
Of course, modifying a file would not carry over the metadata. But the same problem exists when modifying annexed files that have metadata attached.
This would also need changes to view generation, I guess that when building a view it would need to consider regular git-tracked files, look up their metadata, and add matching ones to the view tree.