git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Cc: JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com>,
	 "brian m. carlson" <sandals@crustytoothpaste.net>,
	 git@vger.kernel.org,  peff@peff.net, piotrsiupa@gmail.com
Subject: Re: [PATCH] t3706: Add test for wildcard vs literal pathspec
Date: Wed, 16 Apr 2025 09:00:51 -0700	[thread overview]
Message-ID: <xmqqcydchz9o.fsf@gitster.g> (raw)
In-Reply-To: <717161C8-497D-42C7-8C10-AC112238EEFD@gmail.com> (Lucas Seiki Oshiro's message of "Wed, 16 Apr 2025 12:49:51 -0300")

Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> writes:

> So, if I'm not doing anything wrong, it looks that it is not solely
> related to pathspecs, but related to pathspecs when used with some other
> commands. hmmm...

I haven't looked into the code, but if my recollection is correct,
"add" is a bit curious in that it has to deal with paths that are
not yet in the index, unlike "ls-files" and "grep".  It could be one
half of the code paths use the "grab everything that matches the
glob" while the other half uses "stop when there is an exact match",
perhaps?  In the very early days of Git, I do recall making a very
conscious decision to stop when there is an exact match to help
those who add funny pathsnames with glob characters in it, but that
is a long time ago, so I wouldn't be surprised if we gained multiple
code paths to do the same thing, some of which have been corrected
while the original ones haven't.


  reply	other threads:[~2025-04-16 16:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-12  9:46 [PATCH 0/1] add: fix pathspec handling when literal filenames match wildcard K Jayatheerth
2025-04-12  9:46 ` [PATCH 1/1] add: fix handling literal filenames and wildcards K Jayatheerth
2025-04-12 17:40   ` [PATCH] t3706: Add test for wildcard vs literal pathspec K Jayatheerth
2025-04-14 16:51     ` Lucas Seiki Oshiro
2025-04-14 17:08       ` JAYATHEERTH K
2025-04-14 21:42     ` Junio C Hamano
2025-04-15 22:32     ` brian m. carlson
2025-04-16  1:56       ` JAYATHEERTH K
2025-04-16 13:11         ` Junio C Hamano
2025-04-16 14:49           ` JAYATHEERTH K
2025-04-16 15:49             ` Lucas Seiki Oshiro
2025-04-16 16:00               ` Junio C Hamano [this message]
2025-04-19  4:59                 ` JAYATHEERTH K
2025-04-19 17:43                   ` Lucas Seiki Oshiro
2025-04-22 11:57                     ` JAYATHEERTH K
2025-04-16 16:40               ` JAYATHEERTH K
2025-04-16 16:43                 ` JAYATHEERTH K
2025-04-12 15:45 ` [PATCH 0/1] add: fix pathspec handling when literal filenames match wildcard Lucas Seiki Oshiro
2025-04-12 17:34   ` JAYATHEERTH K

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=xmqqcydchz9o.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jayatheerthkulkarni2005@gmail.com \
    --cc=lucasseikioshiro@gmail.com \
    --cc=peff@peff.net \
    --cc=piotrsiupa@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    /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).