All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthew Hughes <mhughes@uw.co.uk>
Cc: git@vger.kernel.org
Subject: Re: Expected behaviour for pathspecs matching attributes in subdirectories
Date: Thu, 06 Jul 2023 10:35:29 -0700	[thread overview]
Message-ID: <xmqq7crddjtq.fsf@gitster.g> (raw)
In-Reply-To: <CAEzX-aD1wfgp8AvNNfCXVM3jAaAjK+uFTqS2XP4CJbVvFr2BtQ@mail.gmail.com> (Matthew Hughes's message of "Thu, 6 Jul 2023 11:33:29 +0100")

Matthew Hughes <mhughes@uw.co.uk> 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
 '
 

  reply	other threads:[~2023-07-06 17:35 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 [this message]
2023-07-06 20:54   ` Matthew Hughes
2023-07-06 21:00     ` Matthew Hughes
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=xmqq7crddjtq.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mhughes@uw.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.