aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/recentchangesdiff.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-12-29 19:58:49 -0400
committerJoey Hess <joey@kitenet.net>2010-12-29 19:58:49 -0400
commit4fb26f4e60f2df282fc972e4b8506ccd306de789 (patch)
treeba95769fbc59a296364076fd2e649f3ebc0438af /IkiWiki/Plugin/recentchangesdiff.pm
parent7d48813166c637e5bb2e11ef690fc7521716bd31 (diff)
downloadikiwiki-4fb26f4e60f2df282fc972e4b8506ccd306de789.tar
ikiwiki-4fb26f4e60f2df282fc972e4b8506ccd306de789.tar.gz
Add a second parameter to the rcs_diff hook, and avoid bloating memory reading in enormous commits.
Diffstat (limited to 'IkiWiki/Plugin/recentchangesdiff.pm')
-rw-r--r--IkiWiki/Plugin/recentchangesdiff.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/recentchangesdiff.pm b/IkiWiki/Plugin/recentchangesdiff.pm
index e3ba9b8d8..71297572d 100644
--- a/IkiWiki/Plugin/recentchangesdiff.pm
+++ b/IkiWiki/Plugin/recentchangesdiff.pm
@@ -28,11 +28,10 @@ sub pagetemplate (@) {
my $template=$params{template};
if ($config{rcs} && exists $params{rev} && length $params{rev} &&
$template->query(name => "diff")) {
- my @lines=IkiWiki::rcs_diff($params{rev});
+ my @lines=IkiWiki::rcs_diff($params{rev}, $maxlines+1);
if (@lines) {
my $diff;
if (@lines > $maxlines) {
- # only include so many lines of diff
$diff=join("", @lines[0..($maxlines-1)])."\n".
gettext("(Diff truncated)");
}