Jakub Narębski writes:
>> I prefer to have like this instead
>>
>> sub prefix_lines {
>> my $prefix = shift;
>> my $string = join("\n", @_);
>> $string =~ s/^/$prefix/mg;
>> return $string;
>> }
>>
>> So both subroutines can take several strings as arguments.
>
>
W dniu 09.11.2016 o 18:02, Vasco Almeida pisze:
> A Ter, 08-11-2016 às 17:06 -0800, Junio C Hamano escreveu:
>> Vasco Almeida writes:
>>> +sub comment_lines {
>>> + my $comment_line_char = config("core.commentchar") || '#';
>>> + return prefix_lines("$comment_line_char ", @_);
>>> +}
>>> +
>>
A Ter, 08-11-2016 às 17:06 -0800, Junio C Hamano escreveu:
> Vasco Almeida writes:
>
> >
> > Add subroutines prefix_lines and comment_lines.
> >
> > Signed-off-by: Vasco Almeida
> > ---
> > perl/Git.pm | 23 +++
> > 1 file changed, 23 insertions(+)
> >
> > diff --git a/pe
Vasco Almeida writes:
> Add subroutines prefix_lines and comment_lines.
>
> Signed-off-by: Vasco Almeida
> ---
> perl/Git.pm | 23 +++
> 1 file changed, 23 insertions(+)
>
> diff --git a/perl/Git.pm b/perl/Git.pm
> index b2732822a..17be59fb7 100644
> --- a/perl/Git.pm
> +++
Add subroutines prefix_lines and comment_lines.
Signed-off-by: Vasco Almeida
---
perl/Git.pm | 23 +++
1 file changed, 23 insertions(+)
diff --git a/perl/Git.pm b/perl/Git.pm
index b2732822a..17be59fb7 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1438,6 +1438,29 @@ sub END
5 matches
Mail list logo