From: Matthew Hughes <matthewhughes934@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matthew Hughes <mhughes@uw.co.uk>, git@vger.kernel.org
Subject: Re: Expected behaviour for pathspecs matching attributes in subdirectories
Date: Sat, 8 Jul 2023 13:42:53 +0100 [thread overview]
Message-ID: <20230708124253.6g2sl2diipqfma7g@archP14s> (raw)
In-Reply-To: <xmqq1qhjbpoz.fsf@gitster.g>
On Fri, Jul 07, 2023 at 10:23:56AM -0700, Junio C Hamano wrote:
> I think in this case the common prefix optimization in "ls-files.c"
> is broken. If we disable it like the attached illustration patch,
> we will see that pathspecs that end with "sub" or "sub/" behave the
> same way, which is what I think people would expect.
Thanks, this also revealed a temporary workaround for me, just add a pathspec
that ensures there's no common prefix but also matches nothing:
$ git ls-files -- ':(attr:labelA)sub/sub/' 'not/a/real/path'
sub/sub/fileA
I might have a look into that optimization and see what changes might be made,
but given I am unfamiliar with the code-base this might not be the most
productive search.
prev parent reply other threads:[~2023-07-08 12:43 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
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 [this message]
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=20230708124253.6g2sl2diipqfma7g@archP14s \
--to=matthewhughes934@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox