Re: [PATCH 02/18] Change style of some regular expressions to make them clearer

2013-06-07 Thread Peter Krefting
Célestin Matte: - Use {}{} instead of /// when slashes or used inside the regexp so as not to escape it. I guess that should read "...when slashes *are* used inside..."? -- \\// Peter - http://www.softwolves.pp.se/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body

Re: [PATCH 02/18] Change style of some regular expressions to make them clearer

2013-06-06 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Jun 6, 2013 at 10:30 PM, Junio C Hamano wrote: >> Eric Sunshine writes: >> - if (my ($child, $parents) = $line =~ m/^-?([a-f0-9]+) ([a-f0-9 ]+)/) { - foreach my $parent (split(' ', $parents)) { >

Re: [PATCH 02/18] Change style of some regular expressions to make them clearer

2013-06-06 Thread Eric Sunshine
On Thu, Jun 6, 2013 at 10:30 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >>> - if (my ($child, $parents) = $line =~ >>> m/^-?([a-f0-9]+) ([a-f0-9 ]+)/) { >>> - foreach my $parent (split(' ', $parents)) { >>> + if (

Re: [PATCH 02/18] Change style of some regular expressions to make them clearer

2013-06-06 Thread Junio C Hamano
Eric Sunshine writes: >> - if (my ($child, $parents) = $line =~ >> m/^-?([a-f0-9]+) ([a-f0-9 ]+)/) { >> - foreach my $parent (split(' ', $parents)) { >> + if (my ($child, $parents) = $line =~ /^-?([a-f0-9]+) >> ([a-f0-9 ]

Re: [PATCH 02/18] Change style of some regular expressions to make them clearer

2013-06-06 Thread Eric Sunshine
On Thu, Jun 6, 2013 at 3:34 PM, Célestin Matte wrote: > - Remove m modifier when useless (m// and // was used randomly; this makes the > code more coherent) > - Remove stringy split (split('c', ...) instead of split(/c/, ...)) > - Use {}{} instead of /// when slashes or used inside the regexp so a

[PATCH 02/18] Change style of some regular expressions to make them clearer

2013-06-06 Thread Célestin Matte
- Remove m modifier when useless (m// and // was used randomly; this makes the code more coherent) - Remove stringy split (split('c', ...) instead of split(/c/, ...)) - Use {}{} instead of /// when slashes or used inside the regexp so as not to escape it. Signed-off-by: Célestin Matte Signed-off-