Re: Problems with Git's "perl" userdiff driver
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> On Wed, Dec 29, 2010 at 06:22, Junio C Hamano <gitster@pobox.com> wrote:
Heh; without in-reply-to or references, this is useless, isn't it?
Show 5 quoted lines
> [better late than never]
>
>> * jn/perl-funcname (2010-12-27) 2 commits
>> - userdiff/perl: catch BEGIN/END/... and POD as headers
>> - diff: funcname and word patterns for perl
For others, the above are these two:
a25e473 (userdiff/perl: catch BEGIN/END/... and POD as headers, 2010-12-27)
71a5d4b (diff: funcname and word patterns for perl, 2010-12-26)
Show 33 quoted lines
> The POD rule doesn't work properly. I suspect it has to be:
>
> "^=head[0-9] .*",
>
> Instead of the current:
>
> "^=head[0-9] ",
>
> Since e.g.:
>
> =head1 WHATEVER
>
> Will just be shown as:
>
> =head1
>
> In the diff context.
>
> And actually it applies very badly to POD in general, since the "sub"
> rule will be tried first, so e.g. in Perldoc we'll often end up
> finding some "sub" example halfway up the file, instead of the =head1*
> or =item* section a few lines up.
>
> And it looks like the regex only catches:
>
> sub foo {
> }
>
> Not:
>
> sub foo
> {
> }