Re: [PATCH 1/2] Diff patterns for POSIX shells

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

 



On Tue, Aug 2, 2011 at 7:51 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Giuseppe Bilotta <giuseppe.bilotta@xxxxxxxxx> writes:
>
>> All diffs following a function definition will have that function name
>> as chunck header, but this is the best we can do with the current
>> userdiff capabilities.
>>
>> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@xxxxxxxxx>
>> ---
>>  userdiff.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/userdiff.c b/userdiff.c
>> index 01d3a8b..70120c3 100644
>> --- a/userdiff.c
>> +++ b/userdiff.c
>> @@ -107,6 +107,9 @@
>>        "(@|@@|\\$)?[a-zA-Z_][a-zA-Z0-9_]*"
>>        "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?."
>>        "|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"),
>> +PATTERNS("shell", "^[ \t]*([a-zA-Z_0-9]+)[ \t]*\\(\\).*",
>> +      /* -- */
>> +      "(--|\\$)?[a-zA-Z_0-9]+|&&|\\|\\|"),
>
> Hmm, what is this "double-dash -- might be present before a name" about?
>

Now that's a good question. I think it was a brainfart while testing
the regexp; came across a case switch where the candidate were
options, and somehow decided that it was better to include the --.
I'll prepare a patch without this stupidity.

-- 
Giuseppe "Oblomov" Bilotta
--
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]