-rw-r--r-- | Makefile | 64 | ||||
-rw-r--r-- | cgit.css | 16 | ||||
-rw-r--r-- | cgitrc.5.txt | 10 |
3 files changed, 77 insertions, 13 deletions
@@ -1,193 +1,243 @@ CGIT_VERSION = v0.8.3.4 CGIT_SCRIPT_NAME = cgit.cgi CGIT_SCRIPT_PATH = /var/www/htdocs/cgit CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) CGIT_CONFIG = /etc/cgitrc CACHE_ROOT = /var/cache/cgit +prefix = /usr +libdir = $(prefix)/lib +filterdir = $(libdir)/cgit/filters +docdir = $(prefix)/share/doc/cgit +htmldir = $(docdir) +pdfdir = $(docdir) +mandir = $(prefix)/share/man SHA1_HEADER = <openssl/sha.h> GIT_VER = 1.7.3 GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 INSTALL = install +MAN5_TXT = $(wildcard *.5.txt) +MAN_TXT = $(MAN5_TXT) +DOC_MAN5 = $(patsubst %.txt,%,$(MAN5_TXT)) +DOC_HTML = $(patsubst %.txt,%.html,$(MAN_TXT)) +DOC_PDF = $(patsubst %.txt,%.pdf,$(MAN_TXT)) # Define NO_STRCASESTR if you don't have strcasestr. # # Define NO_OPENSSL to disable linking with OpenSSL and use bundled SHA1 # implementation (slower). # # Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin). # # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.) # do not support the 'size specifiers' introduced by C99, namely ll, hh, # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t). # some C compilers supported these specifiers prior to C99 as an extension. # #-include config.mak # # Platform specific tweaks # uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') ifeq ($(uname_O),Cygwin) NO_STRCASESTR = YesPlease NEEDS_LIBICONV = YesPlease endif # # Let the user override the above settings. # -include cgit.conf # # Define a way to invoke make in subdirs quietly, shamelessly ripped # from git.git # QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir QUIET_SUBDIR1 = ifneq ($(findstring $(MAKEFLAGS),w),w) PRINT_DIR = --no-print-directory else # "make -w" NO_SUBDIR = : endif ifndef V QUIET_CC = @echo ' ' CC $@; QUIET_MM = @echo ' ' MM $@; QUIET_SUBDIR0 = +@subdir= QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ $(MAKE) $(PRINT_DIR) -C $$subdir endif # # Define a pattern rule for automatic dependency building # %.d: %.c $(QUIET_MM)$(CC) $(CFLAGS) -MM -MP $< | sed -e 's/\($*\)\.o:/\1.o $@:/g' >$@ # # Define a pattern rule for silent object building # %.o: %.c $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lpthread OBJECTS = OBJECTS += cache.o OBJECTS += cgit.o OBJECTS += cmd.o OBJECTS += configfile.o OBJECTS += html.o OBJECTS += parsing.o OBJECTS += scan-tree.o OBJECTS += shared.o OBJECTS += ui-atom.o OBJECTS += ui-blob.o OBJECTS += ui-clone.o OBJECTS += ui-commit.o OBJECTS += ui-diff.o OBJECTS += ui-log.o OBJECTS += ui-patch.o OBJECTS += ui-plain.o OBJECTS += ui-refs.o OBJECTS += ui-repolist.o OBJECTS += ui-shared.o OBJECTS += ui-snapshot.o OBJECTS += ui-ssdiff.o OBJECTS += ui-stats.o OBJECTS += ui-summary.o OBJECTS += ui-tag.o OBJECTS += ui-tree.o ifdef NEEDS_LIBICONV EXTLIBS += -liconv endif .PHONY: all libgit test install uninstall clean force-version get-git \ - doc man-doc html-doc clean-doc + doc clean-doc install-doc install-man install-html install-pdf \ + uninstall-doc uninstall-man uninstall-html uninstall-pdf all: cgit VERSION: force-version @./gen-version.sh "$(CGIT_VERSION)" -include VERSION CFLAGS += -g -Wall -Igit CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"' GIT_OPTIONS = prefix=/usr ifdef NO_ICONV CFLAGS += -DNO_ICONV endif ifdef NO_STRCASESTR CFLAGS += -DNO_STRCASESTR endif ifdef NO_C99_FORMAT CFLAGS += -DNO_C99_FORMAT endif ifdef NO_OPENSSL CFLAGS += -DNO_OPENSSL GIT_OPTIONS += NO_OPENSSL=1 else EXTLIBS += -lcrypto endif cgit: $(OBJECTS) libgit $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) cgit.o: VERSION ifneq "$(MAKECMDGOALS)" "clean" -include $(OBJECTS:.o=.d) endif libgit: $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) xdiff/lib.a test: all $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all install: all $(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_SCRIPT_PATH) $(INSTALL) -m 0755 cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) $(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_DATA_PATH) $(INSTALL) -m 0644 cgit.css $(DESTDIR)$(CGIT_DATA_PATH)/cgit.css $(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png + $(INSTALL) -m 0755 -d $(DESTDIR)$(filterdir) + $(INSTALL) -m 0755 filters/* $(DESTDIR)$(filterdir) + +install-doc: install-man install-html install-pdf + +install-man: doc-man + $(INSTALL) -m 0755 -d $(DESTDIR)$(mandir)/man5 + $(INSTALL) -m 0644 $(DOC_MAN5) $(DESTDIR)$(mandir)/man5 + +install-html: doc-html + $(INSTALL) -m 0755 -d $(DESTDIR)$(htmldir) + $(INSTALL) -m 0644 $(DOC_HTML) $(DESTDIR)$(htmldir) + +install-pdf: doc-pdf + $(INSTALL) -m 0755 -d $(DESTDIR)$(pdfdir) + $(INSTALL) -m 0644 $(DOC_PDF) $(DESTDIR)$(pdfdir) uninstall: rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) rm -f $(CGIT_DATA_PATH)/cgit.css rm -f $(CGIT_DATA_PATH)/cgit.png -doc: man-doc html-doc pdf-doc +uninstall-doc: uninstall-man uninstall-html uninstall-pdf + +uninstall-man: + @for i in $(DOC_MAN5); do \ + rm -fv $(DESTDIR)$(mandir)/man5/$$i; \ + done + +uninstall-html: + @for i in $(DOC_HTML); do \ + rm -fv $(DESTDIR)$(htmldir)/$$i; \ + done + +uninstall-pdf: + @for i in $(DOC_PDF); do \ + rm -fv $(DESTDIR)$(pdfdir)/$$i; \ + done + +doc: doc-man doc-html doc-pdf +doc-man: doc-man5 +doc-man5: $(DOC_MAN5) +doc-html: $(DOC_HTML) +doc-pdf: $(DOC_PDF) -man-doc: cgitrc.5.txt - a2x -f manpage cgitrc.5.txt +%.5 : %.5.txt + a2x -f manpage $< -html-doc: cgitrc.5.txt - a2x -f xhtml --stylesheet=cgit-doc.css cgitrc.5.txt +$(DOC_HTML): %.html : %.txt + a2x -f xhtml --stylesheet=cgit-doc.css $< -pdf-doc: cgitrc.5.txt +$(DOC_PDF): %.pdf : %.txt a2x -f pdf cgitrc.5.txt clean: clean-doc rm -f cgit VERSION *.o *.d clean-doc: rm -f cgitrc.5 cgitrc.5.html cgitrc.5.pdf cgitrc.5.xml cgitrc.5.fo get-git: curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git @@ -1,745 +1,759 @@ body, table, form { padding: 0em; margin: 0em; } body { font-family: sans-serif; font-size: 10pt; color: #333; background: white; padding: 4px; } a { color: blue; text-decoration: none; } a:hover { text-decoration: underline; } table { border-collapse: collapse; } table#header { width: 100%; margin-bottom: 1em; } table#header td.logo { width: 96px; } table#header td.main { font-size: 250%; padding-left: 10px; white-space: nowrap; } table#header td.main a { color: #000; } table#header td.form { text-align: right; vertical-align: bottom; padding-right: 1em; padding-bottom: 2px; white-space: nowrap; } table#header td.form form, table#header td.form input, table#header td.form select { font-size: 90%; } table#header td.sub { color: #777; border-top: solid 1px #ccc; padding-left: 10px; } table.tabs { border-bottom: solid 3px #ccc; border-collapse: collapse; margin-top: 2em; margin-bottom: 0px; width: 100%; } table.tabs td { padding: 0px 1em; vertical-align: bottom; } table.tabs td a { padding: 2px 0.75em; color: #777; font-size: 110%; } table.tabs td a.active { color: #000; background-color: #ccc; } table.tabs td.form { text-align: right; } table.tabs td.form form { padding-bottom: 2px; font-size: 90%; white-space: nowrap; } table.tabs td.form input, table.tabs td.form select { font-size: 90%; } div.path { margin: 0px; padding: 5px 2em 2px 2em; color: #000; background-color: #eee; } div.content { margin: 0px; padding: 2em; border-bottom: solid 3px #ccc; } table.list { width: 100%; border: none; border-collapse: collapse; } table.list tr { background: white; } table.list tr.logheader { background: #eee; } table.list tr:hover { background: #eee; } table.list tr.nohover:hover { background: white; } table.list th { font-weight: bold; /* color: #888; border-top: dashed 1px #888; border-bottom: dashed 1px #888; */ padding: 0.1em 0.5em 0.05em 0.5em; vertical-align: baseline; } table.list td { border: none; padding: 0.1em 0.5em 0.1em 0.5em; } table.list td.logsubject { font-family: monospace; font-weight: bold; } table.list td.logmsg { font-family: monospace; white-space: pre; padding: 1em 0.5em 2em 0.5em; } table.list td.lognotes-label { text-align:right; vertical-align:top; } table.list td.lognotes { font-family: monospace; white-space: pre; padding: 0em 0.5em 2em 0.5em; } table.list td a { color: black; } table.list td a.ls-dir { font-weight: bold; color: #00f; } table.list td a:hover { color: #00f; } img { border: none; } input#switch-btn { margin: 2px 0px 0px 0px; } td#sidebar input.txt { width: 100%; margin: 2px 0px 0px 0px; } table#grid { margin: 0px; } td#content { vertical-align: top; padding: 1em 2em 1em 1em; border: none; } div#summary { vertical-align: top; margin-bottom: 1em; } table#downloads { float: right; border-collapse: collapse; border: solid 1px #777; margin-left: 0.5em; margin-bottom: 0.5em; } table#downloads th { background-color: #ccc; } div#blob { border: solid 1px black; } div.error { color: red; font-weight: bold; margin: 1em 2em; } a.ls-blob, a.ls-dir, a.ls-mod { font-family: monospace; } td.ls-size { text-align: right; font-family: monospace; width: 10em; } td.ls-mode { font-family: monospace; width: 10em; } table.blob { margin-top: 0.5em; border-top: solid 1px black; } table.blob td.lines { margin: 0; padding: 0 0 0 0.5em; vertical-align: top; color: black; } table.blob td.linenumbers { margin: 0; padding: 0 0.5em 0 0.5em; vertical-align: top; text-align: right; border-right: 1px solid gray; } table.blob pre { padding: 0; margin: 0; } table.blob a.no { color: gray; text-align: right; text-decoration: none; } table.blob a.no a:hover { color: black; } table.bin-blob { margin-top: 0.5em; border: solid 1px black; } table.bin-blob th { font-family: monospace; white-space: pre; border: solid 1px #777; padding: 0.5em 1em; } table.bin-blob td { font-family: monospace; white-space: pre; border-left: solid 1px #777; padding: 0em 1em; } table.nowrap td { white-space: nowrap; } table.commit-info { border-collapse: collapse; margin-top: 1.5em; } table.commit-info th { text-align: left; font-weight: normal; padding: 0.1em 1em 0.1em 0.1em; vertical-align: top; } table.commit-info td { font-weight: normal; padding: 0.1em 1em 0.1em 0.1em; } div.commit-subject { font-weight: bold; font-size: 125%; margin: 1.5em 0em 0.5em 0em; padding: 0em; } div.commit-msg { white-space: pre; font-family: monospace; } div.notes-header { font-weight: bold; padding-top: 1.5em; } div.notes { white-space: pre; font-family: monospace; border: solid 1px #ee9; background-color: #ffd; padding: 0.3em 2em 0.3em 1em; float: left; } div.notes-footer { clear: left; } div.diffstat-header { font-weight: bold; padding-top: 1.5em; } table.diffstat { border-collapse: collapse; border: solid 1px #aaa; background-color: #eee; } table.diffstat th { font-weight: normal; text-align: left; text-decoration: underline; padding: 0.1em 1em 0.1em 0.1em; font-size: 100%; } table.diffstat td { padding: 0.2em 0.2em 0.1em 0.1em; font-size: 100%; border: none; } table.diffstat td.mode { white-space: nowrap; } table.diffstat td span.modechange { padding-left: 1em; color: red; } table.diffstat td.add a { color: green; } table.diffstat td.del a { color: red; } table.diffstat td.upd a { color: blue; } table.diffstat td.graph { width: 500px; vertical-align: middle; } table.diffstat td.graph table { border: none; } table.diffstat td.graph td { padding: 0px; border: 0px; height: 7pt; } table.diffstat td.graph td.add { background-color: #5c5; } table.diffstat td.graph td.rem { background-color: #c55; } div.diffstat-summary { color: #888; padding-top: 0.5em; } table.diff { width: 100%; } table.diff td { font-family: monospace; white-space: pre; } table.diff td div.head { font-weight: bold; margin-top: 1em; color: black; } table.diff td div.hunk { color: #009; } table.diff td div.add { color: green; } table.diff td div.del { color: red; } .sha1 { font-family: monospace; font-size: 90%; } .left { text-align: left; } .right { text-align: right; } table.list td.reposection { font-style: italic; color: #888; } a.button { font-size: 80%; padding: 0em 0.5em; } a.primary { font-size: 100%; } a.secondary { font-size: 90%; } td.toplevel-repo { } table.list td.sublevel-repo { padding-left: 1.5em; } div.pager { text-align: center; margin: 1em 0em 0em 0em; } div.pager a { color: #777; margin: 0em 0.5em; } span.age-mins { font-weight: bold; color: #080; } span.age-hours { color: #080; } span.age-days { color: #040; } span.age-weeks { color: #444; } span.age-months { color: #888; } span.age-years { color: #bbb; } div.footer { margin-top: 0.5em; text-align: center; font-size: 80%; color: #ccc; } a.branch-deco { margin: 0px 0.5em; padding: 0px 0.25em; background-color: #88ff88; border: solid 1px #007700; } a.tag-deco { margin: 0px 0.5em; padding: 0px 0.25em; background-color: #ffff88; border: solid 1px #777700; } a.remote-deco { margin: 0px 0.5em; padding: 0px 0.25em; background-color: #ccccff; border: solid 1px #000077; } a.deco { margin: 0px 0.5em; padding: 0px 0.25em; background-color: #ff8888; border: solid 1px #770000; } div.commit-subject a.branch-deco, div.commit-subject a.tag-deco, div.commit-subject a.remote-deco, div.commit-subject a.deco { margin-left: 1em; font-size: 75%; } table.stats { border: solid 1px black; border-collapse: collapse; } table.stats th { text-align: left; padding: 1px 0.5em; background-color: #eee; border: solid 1px black; } table.stats td { text-align: right; padding: 1px 0.5em; border: solid 1px black; } table.stats td.total { font-weight: bold; text-align: left; } table.stats td.sum { color: #c00; font-weight: bold; /* background-color: #eee; */ } table.stats td.left { text-align: left; } table.vgraph { border-collapse: separate; border: solid 1px black; height: 200px; } table.vgraph th { background-color: #eee; font-weight: bold; border: solid 1px white; padding: 1px 0.5em; } table.vgraph td { vertical-align: bottom; padding: 0px 10px; } table.vgraph div.bar { background-color: #eee; } table.hgraph { border: solid 1px black; width: 800px; } table.hgraph th { background-color: #eee; font-weight: bold; border: solid 1px black; padding: 1px 0.5em; } table.hgraph td { vertical-align: center; padding: 2px 2px; } table.hgraph div.bar { background-color: #eee; height: 1em; } table.ssdiff { width: 100%; } table.ssdiff td { font-size: 75%; font-family: monospace; white-space: pre; padding: 1px 4px 1px 4px; border-left: solid 1px #aaa; border-right: solid 1px #aaa; } table.ssdiff td.add { color: black; background: #cfc; min-width: 50%; } table.ssdiff td.add_dark { color: black; background: #aca; min-width: 50%; } table.ssdiff span.add { background: #cfc; font-weight: bold; } table.ssdiff td.del { color: black; background: #fcc; min-width: 50%; } table.ssdiff td.del_dark { color: black; background: #caa; min-width: 50%; } table.ssdiff span.del { background: #fcc; font-weight: bold; } table.ssdiff td.changed { color: black; background: #ffc; min-width: 50%; } table.ssdiff td.changed_dark { color: black; background: #cca; min-width: 50%; } table.ssdiff td.lineno { color: black; background: #eee; text-align: right; width: 3em; min-width: 3em; } table.ssdiff td.hunk { color: #black; background: #ccf; border-top: solid 1px #aaa; border-bottom: solid 1px #aaa; } table.ssdiff td.head { border-top: solid 1px #aaa; border-bottom: solid 1px #aaa; } table.ssdiff td.head div.head { font-weight: bold; color: black; } table.ssdiff td.foot { border-top: solid 1px #aaa; border-left: none; border-right: none; border-bottom: none; } table.ssdiff td.space { border: none; } table.ssdiff td.space div { min-height: 3em; -}
\ No newline at end of file +} + +/* Syntax highlighting */ +table.blob .num { color:#2928ff; } +table.blob .esc { color:#ff00ff; } +table.blob .str { color:#ff0000; } +table.blob .dstr { color:#818100; } +table.blob .slc { color:#838183; font-style:italic; } +table.blob .com { color:#838183; font-style:italic; } +table.blob .dir { color:#008200; } +table.blob .sym { color:#000000; } +table.blob .kwa { color:#000000; font-weight:bold; } +table.blob .kwb { color:#830000; } +table.blob .kwc { color:#000000; font-weight:bold; } +table.blob .kwd { color:#010181; } diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 75b6584..8e51ca5 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -1,570 +1,570 @@ :man source: cgit :man manual: cgit CGITRC(5) ======== NAME ---- cgitrc - runtime configuration for cgit SYNOPSIS -------- 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 '#', are ignored. LOCATION -------- 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. GLOBAL SETTINGS --------------- about-filter:: 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, and the STDOUT from the command will be included verbatim on the about page. Default value: none. agefile:: 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". Default value: "info/web/last-modified". cache-root:: Path used to store the cgit cache entries. Default value: "/var/cache/cgit". cache-dynamic-ttl:: Number which specifies the time-to-live, in minutes, for the cached version of repository pages accessed without a fixed SHA1. Default value: "5". cache-repo-ttl:: Number which specifies the time-to-live, in minutes, for the cached version of the repository summary page. Default value: "5". cache-root-ttl:: Number which specifies the time-to-live, in minutes, for the cached version of the repository index page. Default value: "5". cache-scanrc-ttl:: Number which specifies the time-to-live, in minutes, for the result of scanning a path for git repositories. Default value: "15". cache-size:: The maximum number of entries in the cgit cache. Default value: "0" (i.e. caching is disabled). cache-static-ttl:: Number which specifies the time-to-live, in minutes, for the cached version of repository pages accessed with a fixed SHA1. Default value: "5". clone-prefix:: 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 `repo.clone-url` is unspecified. Default value: none. commit-filter:: 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. css:: Url which specifies the css document to include in all cgit pages. Default value: "/cgit.css". embedded:: 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". enable-filter-overrides:: Flag which, when set to "1", allows all filter settings to be overridden in repository-specific cgitrc files. Default value: none. enable-gitweb-owner:: If set to "1" and scan-path is enabled, we first check each repository for the git config value "gitweb.owner" to determine the owner. Default value: "1". See also: scan-path. enable-index-links:: 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". enable-log-filecount:: 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". enable-log-linecount:: 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". enable-remote-branches:: 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". enable-subject-links:: 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". enable-tree-linenumbers:: Flag which, when set to "1", will make cgit generate linenumber links for plaintext blobs printed in the tree view. Default value: "1". favicon:: Url used as link to a shortcut icon for cgit. If specified, it is suggested to use the value "/favicon.ico" since certain browsers will ignore other values. Default value: none. footer:: 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. head-include:: The content of the file specified with this option will be included verbatim in the html HEAD section on all pages. Default value: none. header:: The content of the file specified with this option will be included verbatim at the top of all pages. Default value: none. include:: Name of a configfile to include before the rest of the current config- file is parsed. Default value: none. index-header:: 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. index-info:: 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. local-time:: Flag which, if set to "1", makes cgit print commit and tag times in the servers timezone. Default value: "0". logo:: Url which specifies the source of an image which will be used as a logo on all cgit pages. Default value: "/cgit.png". logo-link:: 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. max-atom-items:: Specifies the number of items to display in atom feeds view. Default value: "10". max-commit-count:: Specifies the number of entries to list per page in "log" view. Default value: "50". max-message-length:: Specifies the maximum number of commit message characters to display in "log" view. Default value: "80". max-repo-count:: Specifies the number of entries to list per page on the repository index page. Default value: "50". max-repodesc-length:: Specifies the maximum number of repo description characters to display on the repository index page. Default value: "80". max-blob-size:: Specifies the maximum size of a blob to display HTML for in KBytes. Default value: "0" (limit disabled). max-stats:: 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". mimetype.<ext>:: Set the mimetype for the specified filename extension. This is used by the `plain` command when returning blob content. module-link:: 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: "./?repo=%s&page=commit&id=%s" nocache:: 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". noplainemail:: If set to "1" showing full author email adresses will be disabled. Default value: "0". noheader:: Flag which, when set to "1", will make cgit omit the standard header on all pages. Default value: none. See also: "embedded". project-list:: 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. readme:: Text which will be used as default value for "repo.readme". Default value: none. remove-suffix:: 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. Default value: "0". See also: scan-path. renamelimit:: Maximum number of files to consider when detecting renames. The value "-1" uses the compiletime value in git (for further info, look at `man git-diff`). Default value: "-1". repo.group:: Legacy alias for "section". This option is deprecated and will not be supported in cgit-1.0. robots:: Text used as content for the "robots" meta-tag. Default value: "index, nofollow". root-desc:: Text printed below the heading on the repository index page. Default value: "a fast webinterface for the git dscm". root-readme:: 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. root-title:: Text printed as heading on the repository index page. Default value: "Git Repository Browser". scan-path:: 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. Default value: none. See also: cache-scanrc-ttl, project-list. section:: The name of the current repository section - all repositories defined after this option will inherit the current section name. Default value: none. section-from-path:: A number which, if specified before 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. side-by-side-diffs:: If set to "1" shows side-by-side diffs instead of unidiffs per default. Default value: "0". snapshots:: Text which specifies the default set of snapshot formats generated by cgit. The value is a space-separated list of zero or more of the values "tar", "tar.gz", "tar.bz2" and "zip". Default value: none. source-filter:: 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. summary-branches:: Specifies the number of branches to display in the repository "summary" view. Default value: "10". summary-log:: Specifies the number of log entries to display in the repository "summary" view. Default value: "10". summary-tags:: Specifies the number of tags to display in the repository "summary" view. Default value: "10". strict-export:: 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 come before 'scan-path'. virtual-root:: Url which, if specified, will be used as root for all cgit links. It will also cause cgit to generate 'virtual urls', i.e. urls like '/cgit/tree/README' as opposed to '?r=cgit&p=tree&path=README'. 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. REPOSITORY SETTINGS ------------------- repo.about-filter:: Override the default about-filter. Default value: none. See also: "enable-filter-overrides". repo.clone-url:: A list of space-separated urls which can be used to clone this repo. Default value: none. repo.commit-filter:: Override the default commit-filter. Default value: none. See also: "enable-filter-overrides". repo.defbranch:: 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: "master". repo.desc:: The value to show as repository description. Default value: none. repo.enable-log-filecount:: A flag which can be used to disable the global setting `enable-log-filecount'. Default value: none. repo.enable-log-linecount:: A flag which can be used to disable the global setting `enable-log-linecount'. Default value: none. repo.enable-remote-branches:: Flag which, when set to "1", will make cgit display remote branches in the summary and refs views. Default value: <enable-remote-branches>. repo.enable-subject-links:: A flag which can be used to override the global setting `enable-subject-links'. Default value: none. repo.max-stats:: Override the default maximum statistics period. Valid values are equal to the values specified for the global "max-stats" setting. Default value: none. repo.name:: The value to show as repository name. Default value: <repo.url>. repo.owner:: A value used to identify the owner of the repository. Default value: none. repo.path:: An absolute path to the repository directory. For non-bare repositories this is the .git-directory. Default value: none. repo.readme:: A path (relative to <repo.path>) 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" Default value: <readme>. repo.snapshots:: A mask of allowed snapshot-formats for this repo, restricted by the "snapshots" global setting. Default value: <snapshots>. repo.section:: Override the current section name for this repository. Default value: none. repo.source-filter:: Override the default source-filter. Default value: none. See also: "enable-filter-overrides". repo.url:: The relative url used to access the repository. This must be the first setting specified for each repo. Default value: none. REPOSITORY-SPECIFIC CGITRC FILE ------------------------------- 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". Note: the "repo." prefix is dropped from the option names in repo-specific config files, e.g. "repo.desc" becomes "desc". EXAMPLE CGITRC FILE ------------------- .... # Enable caching of up to 1000 output entriess cache-size=1000 # Specify some default clone prefixes -clone-prefix=git://foobar.com ssh://foobar.com/pub/git http://foobar.com/git +clone-prefix=git://example.com ssh://example.com/pub/git http://example.com/git # Specify the css url css=/css/cgit.css # Show extra links for each repository on the index page enable-index-links=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 # 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=foobar.com git repositories +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 foobar.com on the index page +# 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 ## ## 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@foobar.com +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@foobar.com +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 .... BUGS ---- 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: robots=index # allow indexing will generate the following html element: <meta name='robots' content='index # allow indexing'/> AUTHOR ------ Lars Hjemli <hjemli@gmail.com> Jason A. Donenfeld <Jason@zx2c4.com> |