X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/a5d35df250559cb050af68ec1d0b62fe2e77bf9fc8182ec3ca2f20e28dc36b92..cfa626243ba2b7c13f099d500f46285f7ac28614d03e2d59333ebf0a72cbf12d:/INSTALL diff --git a/INSTALL b/INSTALL index f048ad9..b5e70aa 100644 --- a/INSTALL +++ b/INSTALL @@ -66,6 +66,11 @@ file for gitweb (in gitweb/README). build configuration variables. By default gitweb tries to find them in the same directory as gitweb.cgi script. +- You can optionally generate a minified version of gitweb.css by defining + the CSSMIN build configuration variable. By default the non-minified + version of gitweb.css will be used. NOTE: if you enable this option, + substitute gitweb.min.css for all uses of gitweb.css in the help files. + Build example ~~~~~~~~~~~~~ @@ -123,6 +128,15 @@ GITWEB_CONFIG file: $feature{'snapshot'}{'default'} = ['zip', 'tgz']; $feature{'snapshot'}{'override'} = 1; +If you allow overriding for the snapshot feature, you can specify which +snapshot formats are globally disabled. You can also add any command line +options you want (such as setting the compression level). For instance, +you can disable Zip compressed snapshots and set GZip to run at level 6 by +adding the following lines to your $GITWEB_CONFIG: + + $known_snapshot_formats{'zip'}{'disabled'} = 1; + $known_snapshot_formats{'tgz'}{'compressor'} = ['gzip','-6']; + Gitweb repositories ------------------- @@ -166,6 +180,27 @@ Gitweb repositories shows repositories only if this file exists in its object database (if directory has the magic file named $export_ok). +- Finally, it is possible to specify an arbitrary perl subroutine that + will be called for each project to determine if it can be exported. + The subroutine receives an absolute path to the project as its only + parameter. + + For example, if you use mod_perl to run the script, and have dumb + http protocol authentication configured for your repositories, you + can use the following hook to allow access only if the user is + authorized to read the files: + + $export_auth_hook = sub { + use Apache2::SubRequest (); + use Apache2::Const -compile => qw(HTTP_OK); + my $path = "$_[0]/HEAD"; + my $r = Apache2::RequestUtil->request; + my $sub = $r->lookup_file($path); + return $sub->filename eq $path + && $sub->status == Apache2::Const::HTTP_OK; + }; + + Generating projects list using gitweb ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~