X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FGitalist%2FController%2FRoot.pm;h=4405ba43da82c521df4b2ccca41a152f29ba8f4c;hb=30e4d46d3ec8b7a731e84e3fe7ef375d33d78e61;hp=da1a9cdde0f959d8ac76e69e05e7da29d926be11;hpb=deb6344b79370d2dda7dc41ce1aa11ac03c6c3e2;p=catagits%2FGitalist.git diff --git a/lib/Gitalist/Controller/Root.pm b/lib/Gitalist/Controller/Root.pm index da1a9cd..4405ba4 100644 --- a/lib/Gitalist/Controller/Root.pm +++ b/lib/Gitalist/Controller/Root.pm @@ -328,7 +328,27 @@ sub reflog : Local { } sub search : Local { - Carp::croak "Not implemented."; + my($self, $c) = @_; + + my $commit = $self->_get_commit($c); + # Lifted from /shortlog. + my %logargs = ( + sha1 => $commit->sha1, + count => Gitalist->config->{paging}{log}, + ($c->req->param('f') ? (file => $c->req->param('f')) : ()), + search => { + type => $c->req->param('type'), + text => $c->req->param('text'), + regexp => $c->req->param('regexp') || 0, + } + ); + + $c->stash( + commit => $commit, + results => [$c->model('Git')->list_revs(%logargs)], + action => 'search', + # This could be added - page => $page, + ); } sub search_help : Local {