For use cases that mix annexed files with files stored in git, the
annex.largefiles config is more important in v6 repositories than before,
since it configures the behavior of git add
and even git commit -a
. To
make it possible to set annex.largefiles so it'll stick across clones of
a repository, I have now made it be supported in .gitattributes
files
as well as git config.
Setting it in .gitattributes looks a little bit different, since the regular .gitattributes syntax can be used to match on the filename.
* annex.largefiles=(largerthan=100kb)
*.c annex.largefiles=nothing
It seems there's no way to make a git attribute value contain whitespace. So, more complicated annex.largefiles expressions need to use parens to break up the words.
* annex.largefiles=(largerthan=100kb)and(not(include=*.c))
... is that lisp showing through your haskell sir?
jokes aside, it's cool that you can actually do that, i didn't know! is the "non-space expression" new too?
Weirdly, that hack wouldn't work if I had used a more lisp-style format for the expressions. At least, I don't think lisp can be written with no whitespace at all, in general. It was just luck that the expression format happened to work out that way.
Anyway, it's a hack, but it works. Would be nice if git got a way to put spaces in gitattribute values..