git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com>
Cc: git@vger.kernel.org,  lucasseikioshiro@gmail.com,  peff@peff.net,
	piotrsiupa@gmail.com,  sandals@crustytoothpaste.net
Subject: Re: [PATCH] dir.c: literal match with wildcard in pathspec should still glob
Date: Mon, 05 May 2025 07:41:30 -0700	[thread overview]
Message-ID: <xmqqwmavqfvp.fsf@gitster.g> (raw)
In-Reply-To: <CA+rGoLfFCi-q52ABUr=0O=pu+qSikcomSk1akHWUkfAfSf=pZg@mail.gmail.com> (JAYATHEERTH K.'s message of "Sat, 3 May 2025 11:54:40 +0530")

JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com> writes:

>> +               if (seen && seen[i] == MATCHED_EXACTLY &&
>> +                       ps->items[i].nowildcard_len == ps->items[i].len)
>>                         continue;
>
> For some reason on my computer when I check the formatted patch the
> ps-> line
> align with the (seen && ...) line perfectly

Because the quoted patch in the message I am responding to has tabs
expanded already, probably by your mailer, I looked at what you
originally posted, and it has these lines:

-		if (seen && seen[i] == MATCHED_EXACTLY)
+		if (seen && seen[i] == MATCHED_EXACTLY &&
+			ps->items[i].nowildcard_len == ps->items[i].len)
 			continue;

Removing the prefix '+'/'-'/' ', and replacing HT with ^I for
visibility, the above looks like this:

^I^Iif (seen && seen[i] == MATCHED_EXACTLY)
^I^Iif (seen && seen[i] == MATCHED_EXACTLY &&
^I^I^Ips->items[i].nowildcard_len == ps->items[i].len)
^I^I^Icontinue;

As the display width in monospace for "if (" is 4 spaces, "seen" and
"ps->" would align only if the third HT expands to 4 spaces on your
system.

Perhaps because you are telling your editor or terminal that your
tab, unlike everybody else's, is 4-space wide or something?

  reply	other threads:[~2025-05-05 14:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 16:05 [PATCH v2] Dir: Fix and test wildcard pathspec handling K Jayatheerth
2025-04-22 18:53 ` Junio C Hamano
2025-05-03  6:07   ` [PATCH] dir.c: literal match with wildcard in pathspec should still glob K Jayatheerth
2025-05-03  6:24     ` JAYATHEERTH K
2025-05-05 14:41       ` Junio C Hamano [this message]
2025-05-05 15:02         ` K Jayatheerth
2025-05-05 15:03         ` 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=xmqqwmavqfvp.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).