Matthew Hughes <mhughes@xxxxxxxx> writes: > Is this the expected behaviour? I looked in t/t6135-pathspec-with-attrs.sh and > didn't see a test case covering something similar. If this is expected, is > there another way to achieve what I'm looking for? I wonder if this serves a good addition to the tests? t/t6135-pathspec-with-attrs.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git c/t/t6135-pathspec-with-attrs.sh w/t/t6135-pathspec-with-attrs.sh index 457cc167c7..83e6bac8e5 100755 --- c/t/t6135-pathspec-with-attrs.sh +++ w/t/t6135-pathspec-with-attrs.sh @@ -75,6 +75,14 @@ test_expect_success 'check specific set attr' ' sub/fileSetLabel EOF git ls-files ":(attr:label)" >actual && + test_cmp expect actual && + + git ls-files ":(attr:label)sub/" >actual && + test_write_lines sub/fileSetLabel >expect && + test_cmp expect actual && + + git ls-files ":(attr:label)sub" >actual && + test_write_lines sub/fileSetLabel >expect && test_cmp expect actual '