Re: [PATCH v5 01/15] Add new git-related helper to contrib

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

 



On Sun, May 19, 2013 at 10:05 AM, Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
> On Sun, May 19, 2013 at 9:40 AM, Ramkumar Ramachandra
> <artagnon@xxxxxxxxx> wrote:

>>> +               '-L', '%u,+%u' % [start, len],
>>> +               '--since', $since, from + '^',
>>> +               '--', source]) do |p|
>>> +      p.each do |line|
>>> +        if line =~ /^(\h{40})/
>>> +          id = $1
>>
>> Use $0 and remove the parens: you're matching the whole line.
>
> No, I'm not matching the whole line, but you are right; there's no
> need for groups.

Actually $&.

-- 
Felipe Contreras
--
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]