From: Joey Hess Date: Mon, 2 Apr 2012 17:50:58 +0000 (-0400) Subject: uniq list for changed hook X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f181b7fa0fe5ce41ccbd93d6e142d35f62fa4d10;p=ikiwiki.git uniq list for changed hook There can be dups when eg, adding a new internal page, apparently. --- diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 5b461611d..d6c1f4f4c 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -832,10 +832,10 @@ sub refresh () { run_hooks(rendered => sub { shift->(keys %rendered) }); run_hooks(change => sub { shift->(keys %rendered) }); # back-compat } - run_hooks(changes => sub { - shift->(@$new, @$changed, @$del, - @$internal_new, @$internal_changed, @$internal_del); - }); + my %all_changed = map { $_ => 1 } + @$new, @$changed, @$del, + @$internal_new, @$internal_changed, @$internal_del; + run_hooks(changes => sub { shift->(keys %all_changed) }); } sub clean_rendered {