diff --git a/lib/Gitprep.pm b/lib/Gitprep.pm index fdcc444d..b4a600f4 100644 --- a/lib/Gitprep.pm +++ b/lib/Gitprep.pm @@ -184,6 +184,7 @@ sub startup { # Smart HTTP { + my $r = $r->route('/(:project).git', project => $id_re); { @@ -221,6 +222,16 @@ sub startup { } }); + # / + $r->get('/')->to(cb => sub { + my $self = shift; + + my $user = $self->param('user'); + my $project = $self->param('project'); + + $self->redirect_to("/$user/$project"); + }); + # /info/refs $r->get('/info/refs' => template 'smart-http/info-refs');