Right now, non-annexed files get passed through the annex
clean/smudge filter (see Adding files to git: Very long "recording state in git" phase). It would be better if git-annex
configure the filter only for the annexed unlocked files, in the .gitattributes
file at the root of the repository.
It immediately occurs to me that the proposal would break this:
Since foo was a locked file, gitattributes would prevent from being smudged, so the large content that was in bar gets committed directly to git.
The right solution is to improve the smudge/clean filter interface to it's not so slow, which there is copious discussion of elsewhere.
git mv
won't move an unlocked file onto a locked file (trace below)."The right solution is to improve the smudge/clean filter interface" -- of course, but realistically, do you think git devs can be persuaded to do this sometime soon? Even if yes, it still seems better to avoid adding a step to common git workflows, than to make the step fast.
Also,
git mv
seems to reuse the already-smudged object contents of the source file for the target file, so even withgit mv -f
only the checksum gets checked into git: