I wondered if I could mark some untracked files but 'precious' using git attributes. Then I worried that the majority of people who don't care about this precious thing will have to pay for git_check_attr() just because some people want it. Which led me to try to optimize the attr machinery so that, if there's no sign of "precious" (or any attribute of interest) being defined, we can keep the overhead down to minimum. The test suite passes, but these optimizations could break down in subtle ways... Nguyễn Thái Ngọc Duy (4): attr.c: rename global var attr_nr to git_attr_nr attr.c: split path processing code out of collect_all_attrs() attr: do not attempt to expand when we know it's not a macro attr: avoid heavy work when we know the specified attr is not defined attr.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 74 insertions(+), 18 deletions(-) -- 2.2.0.84.ge9c7a8a -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html