Code

Merge the attributes fix in from maint-1.6.6 branch
[git.git] / t / t0003-attributes.sh
index 6946c4b82f9291f6618d49de2e3892a2c203d337..19265c77cf0b1df828eea188d5f880cbb7497c63 100755 (executable)
@@ -172,6 +172,16 @@ test_expect_success 'relative paths' '
 
 '
 
+test_expect_success 'prefixes are not confused with leading directories' '
+       attr_check a_plus/g unspecified &&
+       cat >expect <<-\EOF &&
+       a/g: test: a/g
+       a_plus/g: test: unspecified
+       EOF
+       git check-attr test a/g a_plus/g >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'core.attributesfile' '
        attr_check global unspecified &&
        git config core.attributesfile "$HOME/global-gitattributes" &&