git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problems with Git's "perl" userdiff driver
@ 2011-05-15 18:14 Ævar Arnfjörð Bjarmason
  2011-05-15 20:02 ` Junio C Hamano
  2011-05-21 18:53 ` [PATCH 0/7] " Jonathan Nieder
  0 siblings, 2 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2011-05-15 18:14 UTC (permalink / raw)
  To: Junio C Hamano, Jonathan Nieder; +Cc: git

On Wed, Dec 29, 2010 at 06:22, Junio C Hamano <gitster@pobox.com> wrote:

[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

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
    {
    }

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-05-22 17:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-15 18:14 Problems with Git's "perl" userdiff driver Ævar Arnfjörð Bjarmason
2011-05-15 20:02 ` Junio C Hamano
2011-05-15 20:13   ` Ævar Arnfjörð Bjarmason
2011-05-21 18:53 ` [PATCH 0/7] " Jonathan Nieder
2011-05-21 19:11   ` [PATCH 1/7] t4018 (funcname patterns): make .gitattributes state easier to track Jonathan Nieder
2011-05-21 19:22   ` [PATCH 2/7] t4018 (funcname patterns): make configuration " Jonathan Nieder
2011-05-21 19:25   ` [PATCH 3/7] t4018 (funcname patterns): minor cleanups Jonathan Nieder
2011-05-21 19:29   ` [PATCH 4/7] userdiff/perl: anchor "sub" and "package" patterns on the left Jonathan Nieder
2011-05-21 19:35   ` [PATCH 5/7] userdiff/perl: match full line of POD headers Jonathan Nieder
2011-05-21 19:38   ` [PATCH 6/7] userdiff/perl: catch sub with brace on second line Jonathan Nieder
2011-05-22 17:29     ` [PATCH 8/7] userdiff/perl: tighten BEGIN/END block pattern to reject here-doc delimiters Jonathan Nieder
2011-05-21 19:40   ` [PATCH 7/7] tests: make test_expect_code quieter on success Jonathan Nieder
2011-05-22  8:04   ` [PATCH 0/7] Re: Problems with Git's "perl" userdiff driver Ævar Arnfjörð Bjarmason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).