From: Matthew Hughes <mhughes@uw.co.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Expected behaviour for pathspecs matching attributes in subdirectories
Date: Thu, 6 Jul 2023 22:00:01 +0100 [thread overview]
Message-ID: <CAEzX-aBUyKivBYTFaLh0_irEH5ToVTVBUsSSU03-3ZMdPbjOow@mail.gmail.com> (raw)
In-Reply-To: <CAEzX-aC=UDkf6nevLbN0bNyGXujZVDuqtCp3YcYhAPD6zvYZiQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 106 bytes --]
Apologies, re-sending the patch as an attachment instead, since Gmail
decided to strip the tab characters
[-- Attachment #2: attributes_test.patch --]
[-- Type: text/x-patch, Size: 838 bytes --]
diff --git a/t/t6135-pathspec-with-attrs.sh b/t/t6135-pathspec-with-attrs.sh
index 457cc167c7..7a7502a6eb 100755
--- a/t/t6135-pathspec-with-attrs.sh
+++ b/t/t6135-pathspec-with-attrs.sh
@@ -87,6 +87,23 @@ test_expect_success 'check specific set attr (2)' '
test_cmp expect actual
'
+test_expect_success 'check specific set attr nested .gitattributes' '
+ cat <<-\EOF >sub/.gitattributes &&
+ fileSetLabel otherLabel
+ EOF
+ test_write_lines sub/fileSetLabel >expect &&
+ git ls-files ":(attr:otherLabel)" >actual &&
+ test_cmp expect actual &&
+
+ git ls-files ":(attr:otherLabel)sub" >actual &&
+ test_cmp expect actual &&
+
+ git ls-files ":(attr:otherLabel)sub/" >actual &&
+ test_must_be_empty actual &&
+
+ rm sub/.gitattributes
+'
+
test_expect_success 'check specific unset attr' '
cat <<-\EOF >expect &&
fileUnsetLabel
next prev parent reply other threads:[~2023-07-06 21:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 10:33 Expected behaviour for pathspecs matching attributes in subdirectories Matthew Hughes
2023-07-06 17:35 ` Junio C Hamano
2023-07-06 20:54 ` Matthew Hughes
2023-07-06 21:00 ` Matthew Hughes [this message]
2023-07-06 21:01 ` Junio C Hamano
2023-07-07 8:45 ` Matthew Hughes
2023-07-07 17:23 ` Junio C Hamano
2023-07-07 19:28 ` Eric Sunshine
2023-07-08 12:42 ` Matthew Hughes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAEzX-aBUyKivBYTFaLh0_irEH5ToVTVBUsSSU03-3ZMdPbjOow@mail.gmail.com \
--to=mhughes@uw.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).