commit: ignore intent-to-add entries instead of refusing
[gitweb.git] / t / t0003-attributes.sh
index e75153bdea05d2e34570aaf03fbb3902694ddedf..61b5a2eba633d52ebf53efb3c0539f8abf4094ea 100755 (executable)
@@ -60,6 +60,16 @@ test_expect_success 'attribute test' '
 
 '
 
+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" &&
@@ -72,7 +82,7 @@ test_expect_success 'core.attributesfile' '
 
 test_expect_success 'attribute test: read paths from stdin' '
 
-       cat <<EOF > expect
+       cat <<EOF > expect &&
 f: test: f
 a/f: test: f
 a/c/f: test: f