Sophie

Sophie

distrib > Mageia > 6 > armv7hl > by-pkgid > 3c139fdacd7b87fec40dee0138cb82c1 > files > 31

cgit-0.12-3.mga6.armv7hl.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>CGITRC(5)</title><link rel="stylesheet" type="text/css" href="cgit-doc.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /></head><body><div xml:lang="en" class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="idp1241131352"></a>CGITRC(5)</h2></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="#_name">1. NAME</a></span></dt><dt><span class="section"><a href="#_synopsis">2. SYNOPSIS</a></span></dt><dt><span class="section"><a href="#_location">3. LOCATION</a></span></dt><dt><span class="section"><a href="#_global_settings">4. GLOBAL SETTINGS</a></span></dt><dt><span class="section"><a href="#_repository_settings">5. REPOSITORY SETTINGS</a></span></dt><dt><span class="section"><a href="#_repository_specific_cgitrc_file">6. REPOSITORY-SPECIFIC CGITRC FILE</a></span></dt><dt><span class="section"><a href="#_filter_api">7. FILTER API</a></span></dt><dt><span class="section"><a href="#_macro_expansion">8. MACRO EXPANSION</a></span></dt><dt><span class="section"><a href="#_cache">9. CACHE</a></span></dt><dt><span class="section"><a href="#_example_cgitrc_file">10. EXAMPLE CGITRC FILE</a></span></dt><dt><span class="section"><a href="#_bugs">11. BUGS</a></span></dt><dt><span class="section"><a href="#_author">12. AUTHOR</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_name"></a>1. NAME</h2></div></div></div><p>cgitrc - runtime configuration for cgit</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_synopsis"></a>2. SYNOPSIS</h2></div></div></div><p>Cgitrc contains all runtime settings for cgit, including the list of git
repositories, formatted as a line-separated list of NAME=VALUE pairs. Blank
lines, and lines starting with <span class="emphasis"><em>#</em></span>, are ignored.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_location"></a>3. LOCATION</h2></div></div></div><p>The default location of cgitrc, defined at compile time, is /etc/cgitrc. At
runtime, cgit will consult the environment variable CGIT_CONFIG and, if
defined, use its value instead.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_global_settings"></a>4. GLOBAL SETTINGS</h2></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">
about-filter
</span></dt><dd>
        Specifies a command which will be invoked to format the content of
        about pages (both top-level and for each repository). The command will
        get the content of the about-file on its STDIN, the name of the file
        as the first argument, and the STDOUT from the command will be
        included verbatim on the about page. Default value: none. See
        also: "FILTER API".
</dd><dt><span class="term">
agefile
</span></dt><dd>
        Specifies a path, relative to each repository path, which can be used
        to specify the date and time of the youngest commit in the repository.
        The first line in the file is used as input to the "parse_date"
        function in libgit. Recommended timestamp-format is "yyyy-mm-dd
        hh:mm:ss". You may want to generate this file from a post-receive
        hook. Default value: "info/web/last-modified".
</dd><dt><span class="term">
auth-filter
</span></dt><dd>
        Specifies a command that will be invoked for authenticating repository
        access. Receives quite a few arguments, and data on both stdin and
        stdout for authentication processing. Details follow later in this
        document. If no auth-filter is specified, no authentication is
        performed. Default value: none. See also: "FILTER API".
</dd><dt><span class="term">
branch-sort
</span></dt><dd>
        Flag which, when set to "age", enables date ordering in the branch ref
        list, and when set to "name" enables ordering by branch name. Default
        value: "name".
</dd><dt><span class="term">
cache-root
</span></dt><dd>
        Path used to store the cgit cache entries. Default value:
        "/var/cache/cgit". See also: "MACRO EXPANSION".
</dd><dt><span class="term">
cache-static-ttl
</span></dt><dd>
        Number which specifies the time-to-live, in minutes, for the cached
        version of repository pages accessed with a fixed SHA1. See also:
        "CACHE". Default value: -1".
</dd><dt><span class="term">
cache-dynamic-ttl
</span></dt><dd>
        Number which specifies the time-to-live, in minutes, for the cached
        version of repository pages accessed without a fixed SHA1. See also:
        "CACHE". Default value: "5".
</dd><dt><span class="term">
cache-repo-ttl
</span></dt><dd>
        Number which specifies the time-to-live, in minutes, for the cached
        version of the repository summary page. See also: "CACHE". Default
        value: "5".
</dd><dt><span class="term">
cache-root-ttl
</span></dt><dd>
        Number which specifies the time-to-live, in minutes, for the cached
        version of the repository index page. See also: "CACHE". Default
        value: "5".
</dd><dt><span class="term">
cache-scanrc-ttl
</span></dt><dd>
        Number which specifies the time-to-live, in minutes, for the result
        of scanning a path for git repositories. See also: "CACHE". Default
        value: "15".
</dd><dt><span class="term">
cache-about-ttl
</span></dt><dd>
        Number which specifies the time-to-live, in minutes, for the cached
        version of the repository about page. See also: "CACHE". Default
        value: "15".
</dd><dt><span class="term">
cache-snapshot-ttl
</span></dt><dd>
        Number which specifies the time-to-live, in minutes, for the cached
        version of snapshots. See also: "CACHE". Default value: "5".
</dd><dt><span class="term">
cache-size
</span></dt><dd>
        The maximum number of entries in the cgit cache. When set to "0",
        caching is disabled. See also: "CACHE". Default value: "0"
</dd><dt><span class="term">
case-sensitive-sort
</span></dt><dd>
        Sort items in the repo list case sensitively. Default value: "1".
        See also: repository-sort, section-sort.
</dd><dt><span class="term">
clone-prefix
</span></dt><dd>
        Space-separated list of common prefixes which, when combined with a
        repository url, generates valid clone urls for the repository. This
        setting is only used if <code class="literal">repo.clone-url</code> is unspecified. Default value:
        none.
</dd><dt><span class="term">
clone-url
</span></dt><dd>
        Space-separated list of clone-url templates. This setting is only
        used if <code class="literal">repo.clone-url</code> is unspecified. Default value: none. See
        also: "MACRO EXPANSION", "FILTER API".
</dd><dt><span class="term">
commit-filter
</span></dt><dd>
        Specifies a command which will be invoked to format commit messages.
        The command will get the message on its STDIN, and the STDOUT from the
        command will be included verbatim as the commit message, i.e. this can
        be used to implement bugtracker integration. Default value: none.
        See also: "FILTER API".
</dd><dt><span class="term">
commit-sort
</span></dt><dd>
        Flag which, when set to "date", enables strict date ordering in the
        commit log, and when set to "topo" enables strict topological
        ordering. If unset, the default ordering of "git log" is used. Default
        value: unset.
</dd><dt><span class="term">
css
</span></dt><dd>
        Url which specifies the css document to include in all cgit pages.
        Default value: "/cgit.css".
</dd><dt><span class="term">
email-filter
</span></dt><dd>
        Specifies a command which will be invoked to format names and email
        address of committers, authors, and taggers, as represented in various
        places throughout the cgit interface. This command will receive an
        email address and an origin page string as its command line arguments,
        and the text to format on STDIN. It is to write the formatted text back
        out onto STDOUT. Default value: none. See also: "FILTER API".
</dd><dt><span class="term">
embedded
</span></dt><dd>
        Flag which, when set to "1", will make cgit generate a html fragment
        suitable for embedding in other html pages. Default value: none. See
        also: "noheader".
</dd><dt><span class="term">
enable-commit-graph
</span></dt><dd>
        Flag which, when set to "1", will make cgit print an ASCII-art commit
        history graph to the left of the commit messages in the repository
        log page. Default value: "0".
</dd><dt><span class="term">
enable-filter-overrides
</span></dt><dd>
        Flag which, when set to "1", allows all filter settings to be
        overridden in repository-specific cgitrc files. Default value: none.
</dd><dt><span class="term">
enable-follow-links
</span></dt><dd>
        Flag which, when set to "1", allows users to follow a file in the log
        view.  Default value: "0".
</dd><dt><span class="term">
enable-http-clone
</span></dt><dd>
        If set to "1", cgit will act as an dumb HTTP endpoint for git clones.
        You can add "http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL" to clone-url
        to expose this feature. If you use an alternate way of serving git
        repositories, you may wish to disable this. Default value: "1".
</dd><dt><span class="term">
enable-index-links
</span></dt><dd>
        Flag which, when set to "1", will make cgit generate extra links for
        each repo in the repository index (specifically, to the "summary",
        "commit" and "tree" pages). Default value: "0".
</dd><dt><span class="term">
enable-index-owner
</span></dt><dd>
        Flag which, when set to "1", will make cgit display the owner of
        each repo in the repository index. Default value: "1".
</dd><dt><span class="term">
enable-log-filecount
</span></dt><dd>
        Flag which, when set to "1", will make cgit print the number of
        modified files for each commit on the repository log page. Default
        value: "0".
</dd><dt><span class="term">
enable-log-linecount
</span></dt><dd>
        Flag which, when set to "1", will make cgit print the number of added
        and removed lines for each commit on the repository log page. Default
        value: "0".
</dd><dt><span class="term">
enable-remote-branches
</span></dt><dd>
        Flag which, when set to "1", will make cgit display remote branches
        in the summary and refs views. Default value: "0". See also:
        "repo.enable-remote-branches".
</dd><dt><span class="term">
enable-subject-links
</span></dt><dd>
        Flag which, when set to "1", will make cgit use the subject of the
        parent commit as link text when generating links to parent commits
        in commit view. Default value: "0". See also:
        "repo.enable-subject-links".
</dd><dt><span class="term">
enable-html-serving
</span></dt><dd>
        Flag which, when set to "1", will allow the /plain handler to serve
        mimetype headers that result in the file being treated as HTML by the
        browser. When set to "0", such file types are returned instead as
        text/plain or application/octet-stream. Default value: "0". See also:
        "repo.enable-html-serving".
</dd><dt><span class="term">
enable-tree-linenumbers
</span></dt><dd>
        Flag which, when set to "1", will make cgit generate linenumber links
        for plaintext blobs printed in the tree view. Default value: "1".
</dd><dt><span class="term">
enable-git-config
</span></dt><dd>
        Flag which, when set to "1", will allow cgit to use git config to set
        any repo specific settings. This option is used in conjunction with
        "scan-path", and must be defined prior, to augment repo-specific
        settings. The keys gitweb.owner, gitweb.category, and gitweb.description
        will map to the cgit keys repo.owner, repo.section, and repo.desc,
        respectively. All git config keys that begin with "cgit." will be mapped
        to the corresponding "repo." key in cgit. Default value: "0". See also:
        scan-path, section-from-path.
</dd><dt><span class="term">
favicon
</span></dt><dd>
        Url used as link to a shortcut icon for cgit. It is suggested to use
        the value "/favicon.ico" since certain browsers will ignore other
        values. Default value: "/favicon.ico".
</dd><dt><span class="term">
footer
</span></dt><dd>
        The content of the file specified with this option will be included
        verbatim at the bottom of all pages (i.e. it replaces the standard
        "generated by…" message. Default value: none.
</dd><dt><span class="term">
head-include
</span></dt><dd>
        The content of the file specified with this option will be included
        verbatim in the html HEAD section on all pages. Default value: none.
</dd><dt><span class="term">
header
</span></dt><dd>
        The content of the file specified with this option will be included
        verbatim at the top of all pages. Default value: none.
</dd><dt><span class="term">
include
</span></dt><dd>
        Name of a configfile to include before the rest of the current config-
        file is parsed. Default value: none. See also: "MACRO EXPANSION".
</dd><dt><span class="term">
index-header
</span></dt><dd>
        The content of the file specified with this option will be included
        verbatim above the repository index. This setting is deprecated, and
        will not be supported by cgit-1.0 (use root-readme instead). Default
        value: none.
</dd><dt><span class="term">
index-info
</span></dt><dd>
        The content of the file specified with this option will be included
        verbatim below the heading on the repository index page. This setting
        is deprecated, and will not be supported by cgit-1.0 (use root-desc
        instead). Default value: none.
</dd><dt><span class="term">
local-time
</span></dt><dd>
        Flag which, if set to "1", makes cgit print commit and tag times in the
        servers timezone. Default value: "0".
</dd><dt><span class="term">
logo
</span></dt><dd>
        Url which specifies the source of an image which will be used as a logo
        on all cgit pages. Default value: "/cgit.png".
</dd><dt><span class="term">
logo-link
</span></dt><dd>
        Url loaded when clicking on the cgit logo image. If unspecified the
        calculated url of the repository index page will be used. Default
        value: none.
</dd><dt><span class="term">
owner-filter
</span></dt><dd>
        Specifies a command which will be invoked to format the Owner
        column of the main page.  The command will get the owner on STDIN,
        and the STDOUT from the command will be included verbatim in the
        table.  This can be used to link to additional context such as an
        owners home page.  When active this filter is used instead of the
        default owner query url.  Default value: none.
        See also: "FILTER API".
</dd><dt><span class="term">
max-atom-items
</span></dt><dd>
        Specifies the number of items to display in atom feeds view. Default
        value: "10".
</dd><dt><span class="term">
max-commit-count
</span></dt><dd>
        Specifies the number of entries to list per page in "log" view. Default
        value: "50".
</dd><dt><span class="term">
max-message-length
</span></dt><dd>
        Specifies the maximum number of commit message characters to display in
        "log" view. Default value: "80".
</dd><dt><span class="term">
max-repo-count
</span></dt><dd>
        Specifies the number of entries to list per page on the repository
        index page. Default value: "50".
</dd><dt><span class="term">
max-repodesc-length
</span></dt><dd>
        Specifies the maximum number of repo description characters to display
        on the repository index page. Default value: "80".
</dd><dt><span class="term">
max-blob-size
</span></dt><dd>
        Specifies the maximum size of a blob to display HTML for in KBytes.
        Default value: "0" (limit disabled).
</dd><dt><span class="term">
max-stats
</span></dt><dd>
        Set the default maximum statistics period. Valid values are "week",
        "month", "quarter" and "year". If unspecified, statistics are
        disabled. Default value: none. See also: "repo.max-stats".
</dd><dt><span class="term">
mimetype.&lt;ext&gt;
</span></dt><dd>
        Set the mimetype for the specified filename extension. This is used
        by the <code class="literal">plain</code> command when returning blob content.
</dd><dt><span class="term">
mimetype-file
</span></dt><dd><p class="simpara">
        Specifies the file to use for automatic mimetype lookup. If specified
        then this field is used as a fallback when no "mimetype.&lt;ext&gt;" match is
        found. If unspecified then no such lookup is performed. The typical file
        to use on a Linux system is /etc/mime.types. The format of the file must
        comply to:
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
a comment line is an empty line or a line starting with a hash (#),
          optionally preceded by whitespace
</li><li class="listitem">
a non-comment line starts with the mimetype (like image/png), followed
          by one or more file extensions (like jpg), all separated by whitespace
        Default value: none. See also: "mimetype.&lt;ext&gt;".
</li></ul></div></dd><dt><span class="term">
module-link
</span></dt><dd>
        Text which will be used as the formatstring for a hyperlink when a
        submodule is printed in a directory listing. The arguments for the
        formatstring are the path and SHA1 of the submodule commit. Default
        value: none.
</dd><dt><span class="term">
nocache
</span></dt><dd>
        If set to the value "1" caching will be disabled. This settings is
        deprecated, and will not be honored starting with cgit-1.0. Default
        value: "0".
</dd><dt><span class="term">
noplainemail
</span></dt><dd>
        If set to "1" showing full author email addresses will be disabled.
        Default value: "0".
</dd><dt><span class="term">
noheader
</span></dt><dd>
        Flag which, when set to "1", will make cgit omit the standard header
        on all pages. Default value: none. See also: "embedded".
</dd><dt><span class="term">
project-list
</span></dt><dd>
        A list of subdirectories inside of scan-path, relative to it, that
        should loaded as git repositories. This must be defined prior to
        scan-path. Default value: none. See also: scan-path, "MACRO
        EXPANSION".
</dd><dt><span class="term">
readme
</span></dt><dd>
        Text which will be used as default value for "repo.readme". Multiple
        config keys may be specified, and cgit will use the first found file
        in this list. This is useful in conjunction with scan-path. Default
        value: none. See also: scan-path, repo.readme.
</dd><dt><span class="term">
remove-suffix
</span></dt><dd>
        If set to "1" and scan-path is enabled, if any repositories are found
        with a suffix of ".git", this suffix will be removed for the url and
        name. This must be defined prior to scan-path. Default value: "0".
        See also: scan-path.
</dd><dt><span class="term">
renamelimit
</span></dt><dd>
        Maximum number of files to consider when detecting renames. The value
         "-1" uses the compiletime value in git (for further info, look at
          <code class="literal">man git-diff</code>). Default value: "-1".
</dd><dt><span class="term">
repo.group
</span></dt><dd>
        Legacy alias for "section". This option is deprecated and will not be
        supported in cgit-1.0.
</dd><dt><span class="term">
repository-sort
</span></dt><dd>
        The way in which repositories in each section are sorted. Valid values
        are "name" for sorting by the repo name or "age" for sorting by the
        most recently updated repository. Default value: "name". See also:
        section, case-sensitive-sort, section-sort.
</dd><dt><span class="term">
robots
</span></dt><dd>
        Text used as content for the "robots" meta-tag. Default value:
        "index, nofollow".
</dd><dt><span class="term">
root-desc
</span></dt><dd>
        Text printed below the heading on the repository index page. Default
        value: "a fast webinterface for the git dscm".
</dd><dt><span class="term">
root-readme
</span></dt><dd>
        The content of the file specified with this option will be included
        verbatim below the "about" link on the repository index page. Default
        value: none.
</dd><dt><span class="term">
root-title
</span></dt><dd>
        Text printed as heading on the repository index page. Default value:
        "Git Repository Browser".
</dd><dt><span class="term">
scan-hidden-path
</span></dt><dd>
        If set to "1" and scan-path is enabled, scan-path will recurse into
        directories whose name starts with a period (<span class="emphasis"><em>.</em></span>). Otherwise,
        scan-path will stay away from such directories (considered as
        "hidden"). Note that this does not apply to the ".git" directory in
        non-bare repos. This must be defined prior to scan-path.
        Default value: 0. See also: scan-path.
</dd><dt><span class="term">
scan-path
</span></dt><dd>
        A path which will be scanned for repositories. If caching is enabled,
        the result will be cached as a cgitrc include-file in the cache
        directory. If project-list has been defined prior to scan-path,
        scan-path loads only the directories listed in the file pointed to by
        project-list. Be advised that only the global settings taken
        before the scan-path directive will be applied to each repository.
        Default value: none. See also: cache-scanrc-ttl, project-list,
        "MACRO EXPANSION".
</dd><dt><span class="term">
section
</span></dt><dd>
        The name of the current repository section - all repositories defined
        after this option will inherit the current section name. Default value:
        none.
</dd><dt><span class="term">
section-sort
</span></dt><dd>
        Flag which, when set to "1", will sort the sections on the repository
        listing by name. Set this flag to "0" if the order in the cgitrc file should
        be preserved. Default value: "1". See also: section,
        case-sensitive-sort, repository-sort.
</dd><dt><span class="term">
section-from-path
</span></dt><dd>
        A number which, if defined prior to scan-path, specifies how many
        path elements from each repo path to use as a default section name.
        If negative, cgit will discard the specified number of path elements
        above the repo directory. Default value: "0".
</dd><dt><span class="term">
side-by-side-diffs
</span></dt><dd>
        If set to "1" shows side-by-side diffs instead of unidiffs per
        default. Default value: "0".
</dd><dt><span class="term">
snapshots
</span></dt><dd>
        Text which specifies the default set of snapshot formats that cgit
        generates links for. The value is a space-separated list of zero or
        more of the values "tar", "tar.gz", "tar.bz2", "tar.xz" and "zip".
        Default value: none.
</dd><dt><span class="term">
source-filter
</span></dt><dd>
        Specifies a command which will be invoked to format plaintext blobs
        in the tree view. The command will get the blob content on its STDIN
        and the name of the blob as its only command line argument. The STDOUT
        from the command will be included verbatim as the blob contents, i.e.
        this can be used to implement e.g. syntax highlighting. Default value:
        none. See also: "FILTER API".
</dd><dt><span class="term">
summary-branches
</span></dt><dd>
        Specifies the number of branches to display in the repository "summary"
        view. Default value: "10".
</dd><dt><span class="term">
summary-log
</span></dt><dd>
        Specifies the number of log entries to display in the repository
        "summary" view. Default value: "10".
</dd><dt><span class="term">
summary-tags
</span></dt><dd>
        Specifies the number of tags to display in the repository "summary"
        view. Default value: "10".
</dd><dt><span class="term">
strict-export
</span></dt><dd>
        Filename which, if specified, needs to be present within the repository
        for cgit to allow access to that repository. This can be used to emulate
        gitweb’s EXPORT_OK and STRICT_EXPORT functionality and limit cgit’s
        repositories to match those exported by git-daemon. This option must
        be defined prior to scan-path.
</dd><dt><span class="term">
virtual-root
</span></dt><dd>
        Url which, if specified, will be used as root for all cgit links. It
        will also cause cgit to generate <span class="emphasis"><em>virtual urls</em></span>, i.e. urls like
        <span class="emphasis"><em>/cgit/tree/README</em></span> as opposed to <span class="emphasis"><em>?r=cgit&amp;p=tree&amp;path=README</em></span>. Default
        value: none.
        NOTE: cgit has recently learned how to use PATH_INFO to achieve the
        same kind of virtual urls, so this option will probably be deprecated.
</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_repository_settings"></a>5. REPOSITORY SETTINGS</h2></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">
repo.about-filter
</span></dt><dd>
        Override the default about-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</dd><dt><span class="term">
repo.branch-sort
</span></dt><dd>
        Flag which, when set to "age", enables date ordering in the branch ref
        list, and when set to "name" enables ordering by branch name. Default
        value: "name".
</dd><dt><span class="term">
repo.clone-url
</span></dt><dd>
        A list of space-separated urls which can be used to clone this repo.
        Default value: none. See also: "MACRO EXPANSION".
</dd><dt><span class="term">
repo.commit-filter
</span></dt><dd>
        Override the default commit-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</dd><dt><span class="term">
repo.commit-sort
</span></dt><dd>
        Flag which, when set to "date", enables strict date ordering in the
        commit log, and when set to "topo" enables strict topological
        ordering. If unset, the default ordering of "git log" is used. Default
        value: unset.
</dd><dt><span class="term">
repo.defbranch
</span></dt><dd>
        The name of the default branch for this repository. If no such branch
        exists in the repository, the first branch name (when sorted) is used
        as default instead. Default value: branch pointed to by HEAD, or
        "master" if there is no suitable HEAD.
</dd><dt><span class="term">
repo.desc
</span></dt><dd>
        The value to show as repository description. Default value: none.
</dd><dt><span class="term">
repo.email-filter
</span></dt><dd>
        Override the default email-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</dd><dt><span class="term">
repo.enable-commit-graph
</span></dt><dd>
        A flag which can be used to disable the global setting
        ‘enable-commit-graph’. Default value: none.
</dd><dt><span class="term">
repo.enable-log-filecount
</span></dt><dd>
        A flag which can be used to disable the global setting
        ‘enable-log-filecount’. Default value: none.
</dd><dt><span class="term">
repo.enable-log-linecount
</span></dt><dd>
        A flag which can be used to disable the global setting
        ‘enable-log-linecount’. Default value: none.
</dd><dt><span class="term">
repo.enable-remote-branches
</span></dt><dd>
        Flag which, when set to "1", will make cgit display remote branches
        in the summary and refs views. Default value: &lt;enable-remote-branches&gt;.
</dd><dt><span class="term">
repo.enable-subject-links
</span></dt><dd>
        A flag which can be used to override the global setting
        ‘enable-subject-links’. Default value: none.
</dd><dt><span class="term">
enable-html-serving
</span></dt><dd>
        A flag which can be used to override the global setting
        <code class="literal">enable-html-serving</code>. Default value: none.
</dd><dt><span class="term">
repo.hide
</span></dt><dd>
        Flag which, when set to "1", hides the repository from the repository
        index. The repository can still be accessed by providing a direct path.
        Default value: "0". See also: "repo.ignore".
</dd><dt><span class="term">
repo.ignore
</span></dt><dd>
        Flag which, when set to "1", ignores the repository. The repository
        is not shown in the index and cannot be accessed by providing a direct
        path. Default value: "0". See also: "repo.hide".
</dd><dt><span class="term">
repo.logo
</span></dt><dd>
        Url which specifies the source of an image which will be used as a logo
        on this repo’s pages. Default value: global logo.
</dd><dt><span class="term">
repo.logo-link
</span></dt><dd>
        Url loaded when clicking on the cgit logo image. If unspecified the
        calculated url of the repository index page will be used. Default
        value: global logo-link.
</dd><dt><span class="term">
repo.owner-filter
</span></dt><dd>
        Override the default owner-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</dd><dt><span class="term">
repo.module-link
</span></dt><dd>
        Text which will be used as the formatstring for a hyperlink when a
        submodule is printed in a directory listing. The arguments for the
        formatstring are the path and SHA1 of the submodule commit. Default
        value: &lt;module-link&gt;
</dd><dt><span class="term">
repo.module-link.&lt;path&gt;
</span></dt><dd>
        Text which will be used as the formatstring for a hyperlink when a
        submodule with the specified subdirectory path is printed in a
        directory listing. The only argument for the formatstring is the SHA1
        of the submodule commit. Default value: none.
</dd><dt><span class="term">
repo.max-stats
</span></dt><dd>
        Override the default maximum statistics period. Valid values are equal
        to the values specified for the global "max-stats" setting. Default
        value: none.
</dd><dt><span class="term">
repo.name
</span></dt><dd>
        The value to show as repository name. Default value: &lt;repo.url&gt;.
</dd><dt><span class="term">
repo.owner
</span></dt><dd>
        A value used to identify the owner of the repository. Default value:
        none.
</dd><dt><span class="term">
repo.path
</span></dt><dd>
        An absolute path to the repository directory. For non-bare repositories
        this is the .git-directory. Default value: none.
</dd><dt><span class="term">
repo.readme
</span></dt><dd>
        A path (relative to &lt;repo.path&gt;) which specifies a file to include
        verbatim as the "About" page for this repo. You may also specify a
        git refspec by head or by hash by prepending the refspec followed by
        a colon. For example, "master:docs/readme.mkd". If the value begins
        with a colon, i.e. ":docs/readme.rst", the default branch of the
        repository will be used. Sharing any file will expose that entire
        directory tree to the "/about/PATH" endpoints, so be sure that there
        are no non-public files located in the same directory as the readme
        file. Default value: &lt;readme&gt;.
</dd><dt><span class="term">
repo.snapshots
</span></dt><dd>
        A mask of snapshot formats for this repo that cgit generates links for,
        restricted by the global "snapshots" setting. Default value:
        &lt;snapshots&gt;.
</dd><dt><span class="term">
repo.section
</span></dt><dd>
        Override the current section name for this repository. Default value:
        none.
</dd><dt><span class="term">
repo.source-filter
</span></dt><dd>
        Override the default source-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</dd><dt><span class="term">
repo.url
</span></dt><dd>
        The relative url used to access the repository. This must be the first
        setting specified for each repo. Default value: none.
</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_repository_specific_cgitrc_file"></a>6. REPOSITORY-SPECIFIC CGITRC FILE</h2></div></div></div><p>When the option "scan-path" is used to auto-discover git repositories, cgit
will try to parse the file "cgitrc" within any found repository. Such a
repo-specific config file may contain any of the repo-specific options
described above, except "repo.url" and "repo.path". Additionally, the "filter"
options are only acknowledged in repo-specific config files when
"enable-filter-overrides" is set to "1".</p><p>Note: the "repo." prefix is dropped from the option names in repo-specific
config files, e.g. "repo.desc" becomes "desc".</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_filter_api"></a>7. FILTER API</h2></div></div></div><p>By default, filters are separate processes that are executed each time they
are needed.  Alternative technologies may be used by prefixing the filter
specification with the relevant string; available values are:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
<span class="emphasis"><em>exec:</em></span>
</span></dt><dd>
        The default "one process per filter" mode.
</dd><dt><span class="term">
<span class="emphasis"><em>lua:</em></span>
</span></dt><dd>
        Executes the script using a built-in Lua interpreter. The script is
        loaded once per execution of cgit, and may be called multiple times
        during cgit’s lifetime, making it a good choice for repeated filters
        such as the <span class="emphasis"><em>email filter</em></span>. It responds to three functions:
</dd><dt><span class="term">
<span class="emphasis"><em>filter_open(argument1, argument2, argument3, …)</em></span>
</span></dt><dd>
                This is called upon activation of the filter for a particular
                set of data.
</dd><dt><span class="term">
<span class="emphasis"><em>filter_write(buffer)</em></span>
</span></dt><dd>
                This is called whenever cgit writes data to the webpage.
</dd><dt><span class="term">
<span class="emphasis"><em>filter_close()</em></span>
</span></dt><dd><p class="simpara">
                This is called when the current filtering operation is
                completed. It must return an integer value. Usually 0
                indicates success.
</p><pre class="literallayout">Additionally, cgit exposes to the Lua the following built-in functions:</pre></dd><dt><span class="term">
<span class="emphasis"><em>html(str)</em></span>
</span></dt><dd>
                Writes <span class="emphasis"><em>str</em></span> to the webpage.
</dd><dt><span class="term">
<span class="emphasis"><em>html_txt(str)</em></span>
</span></dt><dd>
                HTML escapes and writes <span class="emphasis"><em>str</em></span> to the webpage.
</dd><dt><span class="term">
<span class="emphasis"><em>html_attr(str)</em></span>
</span></dt><dd>
                HTML escapes for an attribute and writes "str' to the webpage.
</dd><dt><span class="term">
<span class="emphasis"><em>html_url_path(str)</em></span>
</span></dt><dd>
                URL escapes for a path and writes <span class="emphasis"><em>str</em></span> to the webpage.
</dd><dt><span class="term">
<span class="emphasis"><em>html_url_arg(str)</em></span>
</span></dt><dd>
                URL escapes for an argument and writes <span class="emphasis"><em>str</em></span> to the webpage.
</dd><dt><span class="term">
<span class="emphasis"><em>html_include(file)</em></span>
</span></dt><dd>
                Includes <span class="emphasis"><em>file</em></span> in webpage.
</dd></dl></div><p>Parameters are provided to filters as follows.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
about filter
</span></dt><dd>
        This filter is given a single parameter: the filename of the source
        file to filter. The filter can use the filename to determine (for
        example) the type of syntax to follow when formatting the readme file.
        The about text that is to be filtered is available on standard input
        and the filtered text is expected on standard output.
</dd><dt><span class="term">
commit filter
</span></dt><dd>
        This filter is given no arguments. The commit message text that is to
        be filtered is available on standard input and the filtered text is
        expected on standard output.
</dd><dt><span class="term">
email filter
</span></dt><dd>
        This filter is given two parameters: the email address of the relevent
        author and a string indicating the originating page. The filter will
        then receive the text string to format on standard input and is
        expected to write to standard output the formatted text to be included
        in the page.
</dd><dt><span class="term">
owner filter
</span></dt><dd>
        This filter is given no arguments.  The owner text is avilable on
        standard input and the filter is expected to write to standard
        output.  The output is included in the Owner column.
</dd><dt><span class="term">
source filter
</span></dt><dd>
        This filter is given a single parameter: the filename of the source
        file to filter. The filter can use the filename to determine (for
        example) the syntax highlighting mode. The contents of the source
        file that is to be filtered is available on standard input and the
        filtered contents is expected on standard output.
</dd><dt><span class="term">
auth filter
</span></dt><dd><p class="simpara">
        The authentication filter receives 12 parameters:
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
filter action, explained below, which specifies which action the
            filter is called for
</li><li class="listitem">
http cookie
</li><li class="listitem">
http method
</li><li class="listitem">
http referer
</li><li class="listitem">
http path
</li><li class="listitem">
http https flag
</li><li class="listitem">
cgit repo
</li><li class="listitem">
cgit page
</li><li class="listitem">
cgit url
</li><li class="listitem"><p class="simpara">
cgit login url
        When the filter action is "body", this filter must write to output the
        HTML for displaying the login form, which POSTs to the login url. When
        the filter action is "authenticate-cookie", this filter must validate
        the http cookie and return a 0 if it is invalid or 1 if it is invalid,
        in the exit code / close function. If the filter action is
        "authenticate-post", this filter receives POST’d parameters on
        standard input, and should write a complete CGI response, preferably
        with a 302 redirect, and write to output one or more "Set-Cookie"
        HTTP headers, each followed by a newline.
</p><pre class="literallayout">Please see `filters/simple-authentication.lua` for a clear example
script that may be modified.</pre></li></ul></div></dd></dl></div><p>All filters are handed the following environment variables:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
CGIT_REPO_URL (from repo.url)
</li><li class="listitem">
CGIT_REPO_NAME (from repo.name)
</li><li class="listitem">
CGIT_REPO_PATH (from repo.path)
</li><li class="listitem">
CGIT_REPO_OWNER (from repo.owner)
</li><li class="listitem">
CGIT_REPO_DEFBRANCH (from repo.defbranch)
</li><li class="listitem">
CGIT_REPO_SECTION (from repo.section)
</li><li class="listitem">
CGIT_REPO_CLONE_URL (from repo.clone-url)
</li></ul></div><p>If a setting is not defined for a repository and the corresponding global
setting is also not defined (if applicable), then the corresponding
environment variable will be unset.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_macro_expansion"></a>8. MACRO EXPANSION</h2></div></div></div><p>The following cgitrc options support a simple macro expansion feature,
where tokens prefixed with "$" are replaced with the value of a similarly
named environment variable:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
cache-root
</li><li class="listitem">
include
</li><li class="listitem">
project-list
</li><li class="listitem">
scan-path
</li></ul></div><p>Macro expansion will also happen on the content of $CGIT_CONFIG, if
defined.</p><p>One usage of this feature is virtual hosting, which in its simplest form
can be accomplished by adding the following line to /etc/cgitrc:</p><pre class="literallayout">include=/etc/cgitrc.d/$HTTP_HOST</pre><p>The following options are expanded during request processing, and support
the environment variables defined in "FILTER API":</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
clone-url
</li><li class="listitem">
repo.clone-url
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_cache"></a>9. CACHE</h2></div></div></div><p>All cache ttl values are in minutes. Negative ttl values indicate that a page
type will never expire, and thus the first time a URL is accessed, the result
will be cached indefinitely, even if the underlying git repository changes.
Conversely, when a ttl value is zero, the cache is disabled for that
particular page type, and the page type is never cached.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_example_cgitrc_file"></a>10. EXAMPLE CGITRC FILE</h2></div></div></div><pre class="literallayout"># Enable caching of up to 1000 output entries
cache-size=1000


# Specify some default clone urls using macro expansion
clone-url=git://foo.org/$CGIT_REPO_URL git@foo.org:$CGIT_REPO_URL

# Specify the css url
css=/css/cgit.css


# Show owner on index page
enable-index-owner=1


# Allow http transport git clone
enable-http-clone=1


# Show extra links for each repository on the index page
enable-index-links=1


# Enable ASCII art commit history graph on the log pages
enable-commit-graph=1


# Show number of affected files per commit on the log pages
enable-log-filecount=1


# Show number of added/removed lines per commit on the log pages
enable-log-linecount=1


# Sort branches by date
branch-sort=age


# Add a cgit favicon
favicon=/favicon.ico


# Use a custom logo
logo=/img/mylogo.png


# Enable statistics per week, month and quarter
max-stats=quarter


# Set the title and heading of the repository index page
root-title=example.com git repositories


# Set a subheading for the repository index page
root-desc=tracking the foobar development


# Include some more info about example.com on the index page
root-readme=/var/www/htdocs/about.html


# Allow download of tar.gz, tar.bz2 and zip-files
snapshots=tar.gz tar.bz2 zip


##
## List of common mimetypes
##

mimetype.gif=image/gif
mimetype.html=text/html
mimetype.jpg=image/jpeg
mimetype.jpeg=image/jpeg
mimetype.pdf=application/pdf
mimetype.png=image/png
mimetype.svg=image/svg+xml


# Highlight source code with python pygments-based highlighter
source-filter=/var/www/cgit/filters/syntax-highlighting.py

# Format markdown, restructuredtext, manpages, text files, and html files
# through the right converters
about-filter=/var/www/cgit/filters/about-formatting.sh

##
## Search for these files in the root of the default branch of repositories
## for coming up with the about page:
##
readme=:README.md
readme=:readme.md
readme=:README.mkd
readme=:readme.mkd
readme=:README.rst
readme=:readme.rst
readme=:README.html
readme=:readme.html
readme=:README.htm
readme=:readme.htm
readme=:README.txt
readme=:readme.txt
readme=:README
readme=:readme
readme=:INSTALL.md
readme=:install.md
readme=:INSTALL.mkd
readme=:install.mkd
readme=:INSTALL.rst
readme=:install.rst
readme=:INSTALL.html
readme=:install.html
readme=:INSTALL.htm
readme=:install.htm
readme=:INSTALL.txt
readme=:install.txt
readme=:INSTALL
readme=:install


##
## List of repositories.
## PS: Any repositories listed when section is unset will not be
##     displayed under a section heading
## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
##      and included like this:
##        include=/etc/cgitrepos
##


repo.url=foo
repo.path=/pub/git/foo.git
repo.desc=the master foo repository
repo.owner=fooman@example.com
repo.readme=info/web/about.html


repo.url=bar
repo.path=/pub/git/bar.git
repo.desc=the bars for your foo
repo.owner=barman@example.com
repo.readme=info/web/about.html


# The next repositories will be displayed under the 'extras' heading
section=extras


repo.url=baz
repo.path=/pub/git/baz.git
repo.desc=a set of extensions for bar users

repo.url=wiz
repo.path=/pub/git/wiz.git
repo.desc=the wizard of foo


# Add some mirrored repositories
section=mirrors


repo.url=git
repo.path=/pub/git/git.git
repo.desc=the dscm


repo.url=linux
repo.path=/pub/git/linux.git
repo.desc=the kernel

# Disable adhoc downloads of this repo
repo.snapshots=0

# Disable line-counts for this repo
repo.enable-log-linecount=0

# Restrict the max statistics period for this repo
repo.max-stats=month</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_bugs"></a>11. BUGS</h2></div></div></div><p>Comments currently cannot appear on the same line as a setting; the comment
will be included as part of the value. E.g. this line:</p><pre class="literallayout">robots=index  # allow indexing</pre><p>will generate the following html element:</p><pre class="literallayout">&lt;meta name='robots' content='index  # allow indexing'/&gt;</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_author"></a>12. AUTHOR</h2></div></div></div><p>Lars Hjemli &lt;<a class="ulink" href="mailto:hjemli@gmail.com" target="_top">hjemli@gmail.com</a>&gt;
Jason A. Donenfeld &lt;<a class="ulink" href="mailto:Jason@zx2c4.com" target="_top">Jason@zx2c4.com</a>&gt;</p></div></div></body></html>