Commit Graph

3 Commits

Author SHA1 Message Date
brian m. carlson
c38ad0f0fd
commands/track: read all attributes files to parse macros
Currently, when checking for files being tracked, we don't read
gitattributes files that are not in the working directory, so we don't
expand any macros that might be in them.  Ensure that when we read any
gitattributes file, we read all of them, and in the right order, to
expand macros in later files that have been defined in earlier ones.
2018-12-03 17:18:50 +00:00
brian m. carlson
4a5f7e43a3
git: look up default global attributes file if none specified
Git documents the default global attributes file if core.attributesFile
is not specified as $XDG_CONFIG_HOME/git/attributes, or
$HOME/.config/git/attributes if $XDG_CONFIG_HOME is not set or empty.
Teach our attributes file code about this file and read it as normal.
2018-12-03 17:18:50 +00:00
brian m. carlson
f4b8938fd6
git: expand macros when reading gitattributes files
Read and expand macros when reading the gitattributes files so that
users can use shorthands such as "lfs" for "filter=lfs diff=lfs
merge=lfs".  Pass the same macro processor into each attribute lookup
function, since macros can be defined in the system or global file and
then used in per-repository files.
2018-12-03 17:18:49 +00:00