From: Dan Brook Date: Sun, 6 Mar 2011 15:32:00 +0000 (+0000) Subject: Add CONFIGURATION section to Gitalist POD. X-Git-Tag: 0.002009~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5111a8abac4a2ebace393327e51599f4fbd213ff;hp=1891c7741653bd5c20f52aa7176157afeb2e0121;p=catagits%2FGitalist.git Add CONFIGURATION section to Gitalist POD. Also tidied up existing gitalist.conf and other bits and pieces. --- diff --git a/README b/README index 94f2992..61bb97c 100644 --- a/README +++ b/README @@ -137,6 +137,39 @@ RUNNING http://example.gitalist.com +CONFIGURATION + The Gitalist config is loaded with Catalyst::Plugin::ConfigLoader and + the available config options are: + + Model::CollectionOfRepos + git Path to the "git" binary. + + repo_dir + A directory containing the directories to show. + + If no repositories are found in this directory then Gitalist will + search recursively in that directory for repositories. + + search_recursively + A boolean indicating whether to always search recursively for + repositories within "repo_dir". + + whitelist + Path a file containing a list of repositories that can be shown. + Each line in the file will represent the name of a repo to show e.g + + Gitalist + some-bare-repo.git + + This is compatible with "gitweb"'s "projects.list". + + export_ok + If provided every must contain a file of the same name to be + visible. This is similar to "gitweb"'s functionality. + + paging + log The number of commits to show in the + FASTCGI Running Gitalist in FastCGI mode requires a webserver with FastCGI support (such as apache with or ). Below is a diff --git a/gitalist.conf b/gitalist.conf index d2e747c..a238ab0 100644 --- a/gitalist.conf +++ b/gitalist.conf @@ -8,22 +8,12 @@ name Gitalist sitename "A Gitalist" -# $feature{'blame'}{'default'} = [1]; - - - default = 1 - - - -# fs traversing limit for getting project list -# the number is relative to the projectroot -project_maxdepth 2007 - log = 50 summary = 17 +# Support gitweb patches action. max = 16 diff --git a/lib/Gitalist.pm b/lib/Gitalist.pm index 43924c7..b149782 100644 --- a/lib/Gitalist.pm +++ b/lib/Gitalist.pm @@ -206,6 +206,58 @@ This example can be seen live here: http://example.gitalist.com +=head1 CONFIGURATION + +The Gitalist config is loaded with L +and the available config options are: + +=head2 Model::CollectionOfRepos + +=over + +=item git + +Path to the C binary. + +=item repo_dir + +A directory containing the directories to show. + +If no repositories are found in this directory then Gitalist will +search recursively in that directory for repositories. + +=item search_recursively + +A boolean indicating whether to always search recursively for +repositories within C. + +=item whitelist + +Path a file containing a list of repositories that can be shown. Each +line in the file will represent the name of a repo to show e.g + + Gitalist + some-bare-repo.git + +This is compatible with C's C. + +=item export_ok + +If provided every must contain a file of the same name to be +visible. This is similar to C's functionality. + +=back + +=head2 paging + +=over + +=item log + +The number of commits to show in the + +=back + =head2 FASTCGI Running Gitalist in FastCGI mode requires a webserver with FastCGI @@ -250,7 +302,6 @@ Also, note that Apache will refuse C<%2F> in Gitalist URLs unless configured otherwise. Make sure C is in your F file in order for this to run smoothly. - =head1 CONTRIBUTING Patches are welcome, please feel free to fork on github and send pull requests, send patches diff --git a/lib/Gitalist/Controller/Fragment/Ref.pm b/lib/Gitalist/Controller/Fragment/Ref.pm index 6345746..15cd8ff 100644 --- a/lib/Gitalist/Controller/Fragment/Ref.pm +++ b/lib/Gitalist/Controller/Fragment/Ref.pm @@ -62,7 +62,7 @@ after blame => sub { my($self, $c) = @_; my $repository = $c->stash->{Repository}; - # WTF? + my $blame = $c->stash->{Commit}->blame($c->stash->{filename}, $c->stash->{Commit}->sha1); $c->stash( blame => $blame, @@ -94,7 +94,7 @@ after history => sub { my %logargs = ( sha1 => $c->stash->{Commit}->sha1, - count => 25, #Gitalist->config->{paging}{log} || 25, + count => Gitalist->config->{paging}{log} || 25, ($filename ? (file => $filename) : ()) ); diff --git a/lib/Gitalist/Controller/Root.pm b/lib/Gitalist/Controller/Root.pm index 14ef8ee..d598c1f 100644 --- a/lib/Gitalist/Controller/Root.pm +++ b/lib/Gitalist/Controller/Root.pm @@ -48,7 +48,7 @@ sub base : Chained('/root') PathPart('') CaptureArgs(0) { abridged_description => sub { join(' ', grep { defined } (split / /, shift)[0..10]); }, - uri_for_gravatar => sub { # FIXME - Cache these? + uri_for_gravatar => sub { my $email = shift; my $size = shift; my $uri = 'http://www.gravatar.com/avatar/' . md5_hex($email);