diff options
author | Russell Belfer <rb@github.com> | 2014-04-19 01:29:58 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-04-19 01:29:58 +0400 |
commit | e3a2a04ceff1d3657629fd6a7245d9a9fc53f24b (patch) | |
tree | fda2ccea16cfb9295ecad38ad16de9ec2eeee65e /src/attr_file.c | |
parent | 50e46d6018ede64e3e4b177baa4ad8156d928fbd (diff) |
Preload attribute files that may contain macros
There was a latent bug where files that use macro definitions
could be parsed before the macro definitions were loaded. Because
of attribute file caching, preloading files that are going to be
used doesn't add a significant amount of overhead, so let's always
preload any files that could contain macros before we assemble the
actual vector of files to scan for attributes.
Diffstat (limited to 'src/attr_file.c')
-rw-r--r-- | src/attr_file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/attr_file.c b/src/attr_file.c index 65bbf78e8..8a8d86a2d 100644 --- a/src/attr_file.c +++ b/src/attr_file.c @@ -248,9 +248,7 @@ int git_attr_file__parse_buffer( repo, &attrs->pool, &rule->assigns, &scan))) { if (rule->match.flags & GIT_ATTR_FNMATCH_MACRO) - /* should generate error/warning if this is coming from any - * file other than .gitattributes at repo root. - */ + /* TODO: warning if macro found in file below repo root */ error = git_attr_cache__insert_macro(repo, rule); else error = git_vector_insert(&attrs->rules, rule); |