X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9f401d6617a11efcedda1c956b2ccea061a7540f..b12770ac3e382e82125e2950a3ea6594584bb2c6:/IkiWiki/Plugin/darcs.pm diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index 0f63b8807..cd4fcd0ff 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -373,11 +373,13 @@ sub rcs_recentchanges ($) { return @ret; } -sub rcs_diff ($) { +sub rcs_diff ($;$) { my $rev=shift; + my $maxlines=shift; my @lines; foreach my $line (silentsystem("darcs", "diff", "--match", "hash ".$rev)) { if (@lines || $line=~/^diff/) { + last if defined $maxlines && @lines == $maxlines; push @lines, $line."\n"; } }