Skip to content
  • Jonathan Nieder's avatar
    diff: funcname and word patterns for perl · 71a5d4bc
    Jonathan Nieder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The default function name discovery already works quite well for Perl
    code... with the exception of here-documents (or rather their ending).
    
     sub foo {
    	print <<END
     here-document
     END
    	return 1;
     }
    
    The default funcname pattern treats the unindented END line as a
    function declaration and puts it in the @@ line of diff and "grep
    --show-function" output.
    
    With a little knowledge of perl syntax, we can do better.  You can
    try it out by adding "*.perl diff=perl" to the gitattributes file.
    
    Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    71a5d4bc