Massive tree action speedup
[catagits/Gitalist.git] / lib / Gitalist / Controller / Fragment / Ref.pm
index 15cd8ff..bc79659 100644 (file)
@@ -9,14 +9,14 @@ with qw/
 /;
 
 use File::Type::WebImages ();
-use JSON::XS qw(encode_json);
+use JSON::XS qw/encode_json/;
 
 sub base : Chained('/fragment/repository/find') PathPart('') CaptureArgs(0) {}
 
 sub _diff {
     my ($self, $c) = @_;
     my %diff_args = ( patch => 1 );
-    foreach my $arg qw/filename parent/ {
+    foreach my $arg (qw/filename parent/) {
         if (defined $c->stash->{$arg}) {
             $diff_args{$arg} = $c->stash->{$arg};
         };
@@ -54,7 +54,7 @@ after tree => sub {
     ;
     $c->stash(
         tree      => $tree_obj,
-        tree_list => $tree_obj->tree,
+        entries   => $tree_obj->entries,
     );
 };
 
@@ -72,6 +72,12 @@ after blame => sub {
     $c->forward('Model::ContentMangler');
 };
 
+=encoding UTF-8
+
+=head1 NAME
+
+Gitalist::Controller::Fragment::Ref - Fragment::Ref module for Gitalist::Controller
+
 =head2 blob
 
 The blob action i.e the contents of a file.
@@ -110,6 +116,7 @@ after history => sub {
        refs      => $repository->references,
        filename  => $filename,
        filetype  => $file->type,
+       page      => $page,
     );
 };