Re: [PATCH] dir.c: literal match with wildcard in pathspec should still glob

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 5, 2025 at 8:11 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> JAYATHEERTH K <jayatheerthkulkarni2005@xxxxxxxxx> 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?

Thank you for the clarification.
Yes it was the 4 tab thing, my editor has default as 4 therefore the confusion.

-Jayatheerth





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux