git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Problems with Git's "perl" userdiff driver

From
Junio C Hamano <gitster@pobox.com>
Date
May 15, 2011, 20:02 UTC
Message-ID
<7vk4drpwal.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTi=OXznTspN-CJjM0YXfqARxL=J+Ow@mail.gmail.com>
Æ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
>     {
>     }
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 2 of 13 in “Problems with Git's "perl" userdiff driver”
  1. Ævar Arnfjörð BjarmasonMay 15, 2011
  2. Junio C HamanoMay 15, 2011
  3. Ævar Arnfjörð BjarmasonMay 15, 2011
  4. 0/7 Re: Problems with Git's "perl" userdiff driverJonathan Nieder, May 21, 2011
  5. 1/7 t4018 (funcname patterns): make .gitattributes state easier to trackJonathan Nieder, May 21, 2011
  6. 2/7 t4018 (funcname patterns): make configuration easier to trackJonathan Nieder, May 21, 2011
  7. 3/7 t4018 (funcname patterns): minor cleanupsJonathan Nieder, May 21, 2011
  8. 4/7 userdiff/perl: anchor "sub" and "package" patterns on the leftJonathan Nieder, May 21, 2011
  9. 5/7 userdiff/perl: match full line of POD headersJonathan Nieder, May 21, 2011
  10. 6/7 userdiff/perl: catch sub with brace on second lineJonathan Nieder, May 21, 2011
  11. 8/7 userdiff/perl: tighten BEGIN/END block pattern to reject here-doc delimitersJonathan Nieder, May 22, 2011
  12. 7/7 tests: make test_expect_code quieter on successJonathan Nieder, May 21, 2011
  13. Ævar Arnfjörð BjarmasonMay 22, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.