FreedomBox/plinth/modules/gitweb/data/etc/gitweb-freedombox.conf
Veiko Aasa aaee9ec8a9
gitweb: Do not recursively scan for Git repositories
Temporary directories are now hidden when cloning remote repositories.

Fixes #1677

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-07 15:00:24 -08:00

55 lines
1.3 KiB
Plaintext

# path to git projects (<project>.git)
$projectroot = "/var/lib/git";
# directory to use for temp files
$git_temp = "/tmp";
# target of the home link on top of all pages
#$home_link = $my_uri || "/";
# html text to include at home page
#$home_text = "indextext.html";
# file with project list; by default, simply scan the projectroot dir.
#$projects_list = $projectroot;
# stylesheet to use
@stylesheets = ("/gitweb/static/gitweb.css");
# javascript code for gitweb
$javascript = "/gitweb/static/gitweb.js";
# logo to use
$logo = "/gitweb/static/git-logo.png";
# the 'favicon'
$favicon = "/gitweb/static/git-favicon.png";
# git-diff-tree(1) options to use for generated patches
#@diff_opts = ("-M");
# enable short urls
$feature{'pathinfo'}{'default'} = [1];
# enable git blame
$feature{'blame'}{'default'} = [1];
# enable pickaxe search
$feature{'pickaxe'}{'default'} = [1];
# enable syntax highlighting
$feature{'highlight'}{'default'} = [1];
# do not recursively scan for Git repositories
our $project_maxdepth = 1;
# export private repos only if authorized
our $per_request_config = sub {
if(defined $ENV{'REMOTE_USER_TOKENS'}){
our $export_auth_hook = sub { return 1; };
}
else {
our $export_auth_hook = sub { return ! -e "$_[0]/private"; };
}
};