git-annex config annex.largefiles
authorJoey Hess <joeyh@joeyh.name>
Fri, 20 Dec 2019 16:12:31 +0000 (12:12 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 20 Dec 2019 17:01:41 +0000 (13:01 -0400)
commit4acbb40112aa73dcde63841d8d8c04c433f6a806
tree4572c598d93b5538ccfcd9ba6fd28511d506e2d7
parentce3fb0b2e55fce20e2309a7ad3d84b7a061806b6
git-annex config annex.largefiles

annex.largefiles can be configured by git-annex config, to more easily set
a default that will also be used by clones, without needing to shoehorn the
expression into the gitattributes file. The git config and gitattributes
override that.

Whenever something is added to git-annex config, we have to consider what
happens if a user puts a purposfully bad value in there. Or, if a new
git-annex adds some new value that an old git-annex can't parse.
In this case, a global annex.largefiles that can't be parsed currently
makes an error be thrown. That might not be ideal, but the gitattribute
behaves the same, and is almost equally repo-global.

Performance notes:

git-annex add and addurl construct a matcher once
and uses it for every file, so the added time penalty for reading the global
config log is minor. If the gitattributes annex.largefiles were deprecated,
git-annex add would get around 2% faster (excluding hashing), because
looking that up for each file is not fast. So this new way of setting
it is progress toward speeding up add.

git-annex smudge does need to load the log every time. As well as checking
the git attribute. Not ideal. Setting annex.gitaddtoannex=false avoids
both overheads.
Annex.hs
Annex/FileMatcher.hs
CHANGELOG
Config/GitConfig.hs
Remote/Git.hs
Types/GitConfig.hs
doc/git-annex-config.mdwn
doc/git-annex.mdwn
doc/tips/largefiles.mdwn