fecaf2da30
For backwards compatibility reasons, we transform some wildmatch patterns. However, when we're reading a pattern from .gitattributes, we do this as well, and these transformations can cause us to fail to match some things that Git does match. While we want to retain the behavior of the command-line options for compatibility, at least until 3.0, there's no reason for us to mismatch patterns in .gitattributes: that's clearly a bug. Let's add an option to our pattern constructor to match patterns strictly so we can enable it when reading from .gitattributes, and disable our pattern manipulation when it's enabled. To help us improve debugging, let's also add the value of the strictness flag when printing the transformed pattern. |
||
---|---|---|
.. | ||
filepathfilter_test.go | ||
filepathfilter.go |