Re: [PATCH] t5540-http-push.sh: avoid non-portable grep -P

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

 



Jay Soffian <jaysoffian@xxxxxxxxx> writes:

> On Thu, Feb 26, 2009 at 4:48 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> So perhaps define a variable:
>>
>> good="\"\(PUT\|MOVE\) .*/objects/$x2/${x38}_$x40 HTTP/[.0-9]*" 20[0-9]\""
>>
>> and grep for it?
>
> Hmpfh. According to my re_format man page:
>
> Obsolete (``basic'') regular expressions differ in several respects.
> `|' is an ordinary character and there is no equivalent for its
> functionality.

Ahh, you are right; there is no '|'-alternation in BRE.

We of course could do something like:

    good=" .*/objects/$x2/${x38}_$x40 HTTP/[.0-9]*" 20[0-9]\""
    grep -e "\"PUT $good" -e "\"MOVE $good"

But that's too ugly.

I don't mind Perl as we already depend on it; the looseness of the regexp
stil bothers me somewhat, though...
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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