.TH PETAL 1 petal\-VERSION .SH NAME petal \- git web interface .SH SYNOPSIS .B petal .RB [ \-v ] .SH DESCRIPTION .B petal is a CGI program that shows the bare git repositories in .IR root . A directory .IR root / name .git is a repository named .IR name ; names may be nested, such as .BR group/repo , up to .B maxdepth levels. Only repositories containing .B git-daemon-export-ok are shown. .P Pages are selected by .BR PATH_INFO . The longest prefix that names a repository is the repository, the rest is the page. A .I ref is a branch, a tag or a commit id of 4 to 40 hex digits; the longest prefix of the rest that resolves to one is taken. Without a .IR ref , .B HEAD is used. .TP .B / Index of all repositories with description, owner and age of the last commit. .TP .IR /repo ", " /repo /log[/ ref ] Log, .B loglimit commits per page; older pages are reached with .BI ?ofs= n . .TP .IR /repo /tree[/ ref [/ path ]] Directory listing or file view with line anchors. Files larger than .B maxblob bytes are not shown. .TP .IR /repo /raw/ ref / path The file as is, served as .B text/plain or, if binary, .BR application/octet-stream . .TP .IR /repo /commit/ id Commit metadata, diffstat and diff, cut after .B maxdiff lines. .I id must be a commit id of 4 to 40 hex digits. .TP .IR /repo /refs Branches and tags. .P Every response carries a Content-Security-Policy that allows only the stylesheet and icon from the same origin. .SH OPTIONS .TP .B \-v prints version information to stderr, then exits. .SH ENVIRONMENT .TP .B PATH_INFO The page. .TP .B SCRIPT_NAME URL prefix for links. .TP .B QUERY_STRING .BI ofs= n for the log. .TP .B HOME libgit2 refuses repositories owned by another user unless they are listed as .B safe.directory in .IR $HOME /.gitconfig. .SH FILES .TP .IR root / repo .git/description One line describing the repository. .TP .IR root / repo .git/owner One line naming the owner. .TP .IR root / repo .git/git-daemon-export-ok Present if the repository is public. .TP .IR PREFIX /share/petal/style.css ", " icon.svg Stylesheet and icon, to be served at .B css and .BR icon . .SH EXAMPLES .B petal sets no resource limits itself. Run it through a wrapper: .P .nf #!/bin/sh ulimit -t 10 exec /usr/local/bin/petal .fi .P .BR nginx : .P .nf location = /style.css { alias /usr/local/share/petal/style.css; } location = /icon.svg { alias /usr/local/share/petal/icon.svg; } location / { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/local/bin/petal-cgi; fastcgi_param SCRIPT_NAME ""; fastcgi_param PATH_INFO $uri; fastcgi_pass unix:/run/fcgiwrap.sock; } .fi .SH CUSTOMIZATION .B petal is configured by editing .I config.h and recompiling. .SH SEE ALSO .BR herbarium (1), .BR hedge (1), .BR git-http-backend (1)