While gitattributes(5) says that, actually gitattributes and gitignore
use different matching implementations. gitattributes one seems
unchanged since its introduction in d0bfd02 (Add basic infrastructure
to assign attributes to paths - 2007-04-12). gitignore on the other
hand learned foo/ pattern later in d6b8fc3 (gitignore(5): Allow "foo/"
in ignore list to match directory "foo" - 2008-01-31).
Yeah, it looks like a bug to me. A better way to solve this once and
for all, is to unify the two implementations (which is good for
gitattr because there have been optimizations added to gitignore). I
tried long ago and gave up. Something to do with the order of matching
(gitignore tries inner directories first, while gitattr starts from
outer ones).
For the time being, anyone who changes gitignore should be reminded to
consider whether it's applicable to gitattributes and vice versa.
Which reminds me, Joshua, maybe you should add case-insensitive
support to gitattributes too ;-)
--
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html