attr: make attributes depend on file type
This is a whether balloon patch (to check whether this balloons or not,
uhm). Hit it hard, not me ;)
It's part of the way to revive the old idea of making attributes depend
on file type. I am not following the old path
pattern is_symlink otherattr
because that would mean something which looks like an attribute
(is_symlink) but is not. Instead,
symlink:pattern attrs
is to specify attrs for pattern if it is a symlink. So, e.g.,
symlink:* diff=symlink
together with a nice diff.symlink.textconv displays symlinks nicely.
Most notable rough edges:
- git_checkattr() gets a new mode parameter. I've stuck it in where I
could, 0 anywhere else. This is appropriate in many places (where we
know IS_REG a forteriori) but I'm not sure about all of them.
- We/someone could teach git_checkattr other prefixes.
- It is tested with one (1) symlink and works!
- I would bundle it with Jeff's doc and test ;)
- This is not a real commit message.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>