Moving gitweb documentation to manpages
v6 cover Moving gitweb documentation to manpages
The original patch adding manpage for /etc/gitweb.conf was sent by Drew Northup (as can be seen from shortlog); I have added manpage for gitweb itself, inspired by his patch. Unfortunately Drew doesn't currently have time to work on this patch (patch series), so that is why it is me resending this series (yet again).
The difference with previous version
[PATCHv5/RFC 0/6] Moving gitweb documentation to manpages
http://thread.gmane.org/gmane.comp.version-control.git/183166
http://marc.info/?l=git&m=131809875619259&w=2
is that "Documentation: Preparation for gitweb manpages" (originally a first patch) got removed, and two main patches got improved. Other patches are unchanged from previous version.
Pull request:
~~~~~~~~~~~~~
The following changes since commit 288396994f077eec7e7db0017838a5afbfbf81e3:
Sync with maint (2011-10-15 20:59:50 -0700)
are available in the git repository at:
git://repo.or.cz/git/jnareb-git.git gitweb/doc
Table of contents:
~~~~~~~~~~~~~~~~~~
[PATCHv6 1/5] gitweb: Add gitweb.conf(5) manpage for gitweb [PATCHv6 2/5] gitweb: Add gitweb(1) manpage for gitweb itself [PATCHv5 3/5] Documentation: Link to gitweb(1) and gitweb.conf(5) in
other manpages
[PATCHv5 4/5] Documentation: Add gitweb config variables to git-config(1) [PATCHv5 5/5] gitweb: Add gitweb manpages to 'gitweb' package in git.spec
Shortlog:
~~~~~~~~~
Drew Northup (1):
gitweb: Add gitweb.conf(5) manpage for gitweb configuration files
Jakub Narebski (4):
gitweb: Add gitweb(1) manpage for gitweb itself
Documentation: Link to gitweb(1) and gitweb.conf(5) in other manpages
Documentation: Add gitweb config variables to git-config(1)
gitweb: Add gitweb manpages to 'gitweb' package in git.spec
Diffstat:
~~~~~~~~~
Documentation/Makefile | 4 +- Documentation/config.txt | 17 + Documentation/git-instaweb.txt | 4 + Documentation/gitweb.conf.txt | 884 ++++++++++++++++++++++++++++++++++++++++ Documentation/gitweb.txt | 704 ++++++++++++++++++++++++++++++++ command-list.txt | 1 + git.spec.in | 7 + gitweb/INSTALL | 94 +---- gitweb/README | 411 +------------------ 9 files changed, 1648 insertions(+), 478 deletions(-) create mode 100644 Documentation/gitweb.conf.txt create mode 100644 Documentation/gitweb.txt
Signature · 1 line
1.7.6
PATCH v6 1/5 gitweb: Add gitweb.conf(5) manpage for gitweb configuration files
From: Drew Northup <[email protected]>
Much of what is in gitweb.conf.txt has been pulled directly from the README file of gitweb. The manpage was supplemented with description of missing gitweb config variables, and with description of gitweb's %features.
There remains a bit of redundancy, which should be reduced if possible... but I think some of duplication of information is inevitable.
[jn: Improved, extended, removed duplicate info from README]
---
Differences with previous version (v5)
* improved commit subject (title), thanks to Drew Northup, so that it is more obvious which of main patches is which
* The way default values are presented changed from pseudo-markup
[Default: 'foo']
to literal description e.g.
By default set to 'foo'.
Previous version could interfere with AsciiDoc's attribute list for a paragraph in some situations in some asciidoc versions, leading to build failures
asciidoc: ERROR: gitweb.conf.txt: line 484: illegal style name: Default: ()
asciidoc: ERROR: gitweb.conf.txt: line 494: illegal style name: Default: 300
Also, previous version was inconsistent with the way default values are talked about in other manages... and even with gitweb.conf(5) itself.
Interdiff:
~~~~~~~~~~
diff --git i/Documentation/gitweb.conf.txt w/Documentation/gitweb.conf.txt index 31eb527..2b58c56 100644
--- i/Documentation/gitweb.conf.txt
+++ w/Documentation/gitweb.conf.txt
@@ -171,8 +171,8 @@ $export_ok::
effective if this variable evaluates to true. Can be set when building gitweb by setting GITWEB_EXPORT_OK. This path is relative to GIT_DIR. git-daemon[1] uses 'git-daemon-export-ok',
- unless started with --export-all. [No default / Not set
- (this feature is turned off)]
+ unless started with --export-all. By default this variable is
+ not set, which means that this feature is turned off.
$export_auth_hook::
Function used to determine which repositories should be shown.
@@ -200,8 +200,10 @@ $strict_export::
available and not only if it is shown. If $gitweb_list points to file with list of project, only those repositories listed would be available for gitweb. Can be set during building gitweb via
- GITWEB_STRICT_EXPORT. [No default / Not set (you can access
- repositories hidden from projects list page)]
+ GITWEB_STRICT_EXPORT. By default this variable is not set, which
+ means that you can directly access those repositories that are hidden
+ from projects list page (e.g. the are not listed in the $projects_list
+ file).
Finding files
@@ -225,13 +227,15 @@ $mimetypes_file::
as relative to the current git repository, not to CGI script. If unset, only '/etc/mime.types' is used (if present on filesystem). If no mimetypes file is found, mimetype guessing based on extension of file is disabled.
- [Unset by default]
+ Unset by default.
$highlight_bin::
Path to the highlight executable to use (it must be the one from
- http://www.andre-simon.de due to assumptions about parameters and output).
- Useful if 'highlight' is not installed on your web server's PATH.
- [Default: 'highlight']
+ http://www.andre-simon.de[] due to assumptions about parameters and output).
+ By default set to 'highlight'; set it to full path to highlight
+ executable if it is not installed on your web server's PATH.
+ Note that 'highlight' feature must be set for gitweb to actually
+ use syntax hightlighting.
+
*NOTE*: if you want to add support for new file type (supported by "highlight" but not used by gitweb), you need to modify %highlight_ext
@@ -289,7 +293,7 @@ $logo::
is displayed in the top right corner of each gitweb page and used as a logo for the Atom feed. Relative to the base URI of gitweb (as a path). Can be adjusted when building gitweb using GITWEB_LOGO variable
- [Default: 'static/git-logo.png']
+ By default set to 'static/git-logo.png'.
$favicon::
Points to the location where you put 'git-favicon.png' on your web
@@ -298,7 +302,7 @@ $favicon::
may display them in the browser's URL bar and next to the site name in bookmarks. Relative to the base URI of gitweb. Can be adjusted at build time using GITWEB_FAVICON variable.
- [Default: 'static/git-favicon.png']
+ By default set to 'static/git-favicon.png'.
$javascript::
Points to the location where you put 'gitweb.js' on your web server,
@@ -322,14 +326,16 @@ $home_link_str::
(usually the main gitweb page, which contains the projects list). It is used as the first component of gitweb's "breadcrumb trail":
<home link> / <project> / <action>. Can be set at build time using
- the GITWEB_HOME_LINK_STR variable. [Default: "projects"]
+ the GITWEB_HOME_LINK_STR variable. By default it is set to "projects",
+ as this link leads to the list of projects. Other popular choice it to
+ set it to the name of site.
$logo_url::
$logo_label::
URI and label (title) for the Git logo link (or your site logo, if you chose to use different logo image). By default, these both
- refer to git homepage; in the past, they pointed to git documentation
- at http://www.kernel.org[].
+ refer to git homepage, http://git-scm.com[]; in the past, they pointed
+ to git documentation at http://www.kernel.org[].
Changing gitweb's look
@@ -347,24 +353,26 @@ $site_name::
or "Untitled Git" if this variable is not set (e.g. if running gitweb as standalone script).
+
-Can be set using the GITWEB_SITENAME at build time. [No default] +Can be set using the GITWEB_SITENAME at build time. Unset by default.
$site_header::
Name of a file with HTML to be included at the top of each page. Relative to the directory containing the 'gitweb.cgi' script.
- Can be set using GITWEB_SITE_HEADER at build time. [No default]
+ Can be set using GITWEB_SITE_HEADER at build time. No default
+ value.
$site_footer::
Name of a file with HTML to be included at the bottom of each page. Relative to the directory containing the 'gitweb.cgi' script.
- Can be set using GITWEB_SITE_FOOTER at build time. [No default]
+ Can be set using GITWEB_SITE_FOOTER at build time. No default
+ value.
$home_text::
Name of a HTML file which, if it exists, is included on the gitweb projects overview page ("projects_list" view). Relative to the directory containing the gitweb.cgi script. Default value can be adjusted during build time using GITWEB_HOMETEXT variable.
- [Default: 'indextext.html']
+ By default set to 'indextext.html'.
$projects_list_description_width::
The width (in characters) of the "Description" column of the projects list.
@@ -443,26 +451,27 @@ composed from @git_base_url_list elements and project name.
+
You can setup one single value (single entry/item in this list) at build time by setting the GITWEB_BASE_URL built-time configuration variable.
-[Default: (), i.e. empty list]
+By default it is set to (), i.e. an empty list. This means that gitweb +would not try to create project URL (to fetch) from project name.
$projects_list_group_categories::
Whether to enables the grouping of projects by category on the project list page. The category of a project is determined by the $GIT_DIR/category file or the gitweb.category variable in each
- repository's configuration. [Disabled by default].
+ repository's configuration. Disabled by default (set to 0).
$project_list_default_category::
Default category for projects for which none is specified. If this is set to the empty string, such projects will remain uncategorized and listed at the top, above categorized projects. Used only if project categories are enabled, which means if $projects_list_group_categories
- is true. [Default: "" (empty string)]
+ is true. By default set to "" (empty string).
$prevent_xss::
If true, some gitweb features are disabled to prevent content in repositories from launching cross-site scripting (XSS) attacks. Set this to true if you don't trust the content of your repositories.
- [Default: false].
+ False by default (set to 0).
$maxload::
Used to set the maximum load that we will still respond to gitweb queries.
@@ -474,7 +483,7 @@ $maxload::
over the last minute.
+
Set $maxload to undefined value (undef) to turn this feature off.
-[Default: 300]
+The default value is 300.
$per_request_config::
If this is set to code reference, it will be run once for each request.
@@ -491,7 +500,7 @@ our $per_request_config = sub {
If $per_request_config is not a code reference, it is interpreted as boolean value. If it is true gitweb will process config files once per request, and if it is false gitweb will process config files only once, each time it
-is executed. [Default: true]
+is executed. True by default (set to 1).
+
*NOTE*: $my_url, $my_uri, and $base_url are overwritten with their default values before every request, so if you want to change them, be sure to set
Documentation/Makefile | 2 +- Documentation/gitweb.conf.txt | 875 +++++++++++++++++++++++++++++++++++++++++ gitweb/README | 133 +------ 3 files changed, 877 insertions(+), 133 deletions(-) create mode 100644 Documentation/gitweb.conf.txt
Documentation/Makefile +1 -1
@@ -3,7 +3,7 @@ MAN1_TXT= \ $(wildcard git-*.txt)) \ gitk.txt git.txt MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \ - gitrepository-layout.txt + gitrepository-layout.txt gitweb.conf.txt MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \ gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt \ gitdiffcore.txt gitnamespaces.txt gitrevisions.txt gitworkflows.txt
Documentation/gitweb.conf.txt new file +875 -0
875 lines not on this page · raw message
gitweb/README +1 -132
141 lines not on this page · raw message
Signature · 1 line
1.7.6
PATCH v6 2/5 gitweb: Add gitweb(1) manpage for gitweb itself
In reply to Jakub NarebskiMost of what is in gitweb.txt it has been pulled directly from the README and INSTALL files of gitweb.
Current version is somewhat based on structure of SVN::Web manpage (one of web interfaces for Subversion).
gitweb.conf(5) i.e. gitweb configuration manpage now refers to appropriate sections in gitweb(1). gitweb/README now refers to gitweb/INSTALL and gitweb(1) manpage. gitweb/INSTALL now refers to gitweb.conf(5) and gitweb(1).
---
Differences with previous version (v5)
* improved commit subject (title), thanks to Drew Northup, so that it is more obvious which of main patches is which
* Some information was moved from "Synopsis" to "Description" at request of Junio C Hamano and Jonathan Nieder.
*NOTE* that I decided to keep all of first paragraph in "Synopsis", and not only first line of it. In my opinion the second sequence of this paragraph would not makes sense if it were put in "Description".
It can be always deleted when applying, resulting in the following synopsis:
+SYNOPSIS
+--------
+To get started with gitweb, run linkgit:git-instaweb[1] from a git repository.
+Interdiff:
~~~~~~~~~~
diff --git i/Documentation/gitweb.txt w/Documentation/gitweb.txt index 2acdb3b..353e37f 100644
--- i/Documentation/gitweb.txt
+++ w/Documentation/gitweb.txt
@@ -9,11 +9,7 @@ SYNOPSIS
--------
To get started with gitweb, run linkgit:git-instaweb[1] from a git repository. This would configure and start your web server, and run web browser pointing to
-gitweb page.
-
-See http://git.kernel.org/?p=git/git.git;a=tree;f=gitweb[] or -http://repo.or.cz/w/git.git/tree/HEAD:/gitweb/[] for gitweb source code, -browsed using gitweb itself.
+gitweb.
DESCRIPTION
@@ -32,6 +28,11 @@ Gitweb provides a web interface to git repositories. It's features include:
revisions one at a time, viewing the history of the repository.
* Finding commits which commit messages matches given search term.
+See http://git.kernel.org/?p=git/git.git;a=tree;f=gitweb[] or +http://repo.or.cz/w/git.git/tree/HEAD:/gitweb/[] for gitweb source code, +browsed using gitweb itself.
+
+
CONFIGURATION
-------------
Various aspects of gitweb's behavior can be controlled through the configuration
Documentation/Makefile | 2 +- Documentation/gitweb.conf.txt | 9 + Documentation/gitweb.txt | 704 +++++++++++++++++++++++++++++++++++++++++ gitweb/INSTALL | 94 +----- gitweb/README | 278 ++--------------- 5 files changed, 742 insertions(+), 345 deletions(-) create mode 100644 Documentation/gitweb.txt
Documentation/Makefile +1 -1
@@ -1,7 +1,7 @@ MAN1_TXT= \ $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \ $(wildcard git-*.txt)) \ - gitk.txt git.txt + gitk.txt gitweb.txt git.txt MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \ gitrepository-layout.txt gitweb.conf.txt MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
Documentation/gitweb.conf.txt +9 -0
@@ -35,6 +35,10 @@ CGI script with the default name 'gitweb_config.perl' -- allowing one to have multiple gitweb instances with different configurations by the use of symlinks. +Note that some configuration can be controlled on per-repository rather than +gitweb-wide basis: see "Per-repository gitweb configuration" subsection on +linkgit:gitweb[1] manpage. + DISCUSSION ----------
@@ -109,6 +113,8 @@ Location of repositories The configuration variables described below control how gitweb finds git repositories, and how repositories are displayed and accessed. +See also "Repositories" and later subsections in linkgit:gitweb[1] manpage. + $projectroot:: Absolute filesystem path which will be prepended to project path; the path to repository is `$projectroot/$project`. Set to
@@ -193,6 +199,9 @@ our $export_ok = "git-daemon-export-ok"; ---------------------------------------------------------------------------- + If not set (default), it means that this feature is disabled. ++ +See also more involved example in "Controlling access to git repositories" +subsection on linkgit:gitweb[1] manpage. $strict_export:: Only allow viewing of repositories also shown on the overview page.
Documentation/gitweb.txt new file +704 -0
704 lines not on this page · raw message
gitweb/INSTALL +8 -86
112 lines not on this page · raw message
gitweb/README +20 -258
295 lines not on this page · raw message
Signature · 1 line
1.7.6
PATCH v5 3/5 Documentation: Link to gitweb(1) and gitweb.conf(5) in other manpages
In reply to Jakub NarebskiAdd link to gitweb(1) in "SEE ALSO" section of git-instaweb(1) manpage, and "Ancillary Commands" section of git(1) manpage (the latter by the way of command-list.txt file).
---
Unchanged from previous version.
Documentation/git-instaweb.txt | 4 ++++ command-list.txt | 1 + 2 files changed, 5 insertions(+), 0 deletions(-)
Documentation/git-instaweb.txt +4 -0
@@ -84,6 +84,10 @@ If the configuration variable 'instaweb.browser' is not set, 'web.browser' will be used instead if it is defined. See linkgit:git-web{litdd}browse[1] for more information about this. +SEE ALSO +-------- +linkgit:gitweb[1] + GIT --- Part of the linkgit:git[1] suite
command-list.txt +1 -0
@@ -130,5 +130,6 @@ git-upload-pack synchelpers git-var plumbinginterrogators git-verify-pack plumbinginterrogators git-verify-tag ancillaryinterrogators +gitweb ancillaryinterrogators git-whatchanged ancillaryinterrogators git-write-tree plumbingmanipulators
Signature · 1 line
1.7.6
PATCH v5 4/5 Documentation: Add gitweb config variables to git-config(1)
In reply to Jakub NarebskiAdd a list of gitweb config variables to git-config(1) manpage, just linking to gitweb(1) or gitweb.conf(5).
---
Unchanged from previous version.
Documentation/config.txt | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
Documentation/config.txt +17 -0
@@ -1071,6 +1071,23 @@ All gitcvs variables except for 'gitcvs.usecrlfattr' and is one of "ext" and "pserver") to make them apply only for the given access method. +gitweb.category:: +gitweb.description:: +gitweb.owner:: +gitweb.url:: + See linkgit:gitweb[1] for description. + +gitweb.avatar:: +gitweb.blame:: +gitweb.grep:: +gitweb.highlight:: +gitweb.patches:: +gitweb.pickaxe:: +gitweb.remote_heads:: +gitweb.showsizes:: +gitweb.snapshot:: + See linkgit:gitweb.conf[5] for description. + grep.lineNumber:: If set to true, enable '-n' option by default.
Signature · 1 line
1.7.6
PATCH v5 5/5 gitweb: Add gitweb manpages to 'gitweb' package in git.spec
In reply to Jakub Narebski---
Unchanged from previous version
git.spec.in | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
git.spec.in +7 -0
@@ -199,7 +199,11 @@ rm -rf $RPM_BUILD_ROOT %files -n gitweb %defattr(-,root,root) +%doc gitweb/README gitweb/INSTALL Documentation/*gitweb*.txt %{_datadir}/gitweb +%{!?_without_docs: %{_mandir}/man1/*gitweb*.1*} +%{!?_without_docs: %{_mandir}/man5/*gitweb*.5*} +%{!?_without_docs: %doc Documentation/*gitweb*.html } %files -n perl-Git -f perl-files %defattr(-,root,root)
@@ -208,6 +212,9 @@ rm -rf $RPM_BUILD_ROOT # No files for you! %changelog +* Sun Sep 18 2011 Jakub Narebski <[email protected]> +- Add gitweb manpages to 'gitweb' subpackage + * Wed Jun 30 2010 Junio C Hamano <[email protected]> - Add 'gitweb' subpackage.
Signature · 1 line
1.7.6
Quoted 21 lines · Jakub Narebski
The original patch adding manpage for
/etc/gitweb.confwas sent by Drew Northup (as can be seen from shortlog); I have added manpage for gitweb itself, inspired by his patch. Unfortunately Drew doesn't currently have time to work on this patch (patch series), so that is why it is me resending this series (yet again).The difference with previous version
[PATCHv5/RFC 0/6] Moving gitweb documentation to manpages
http://thread.gmane.org/gmane.comp.version-control.git/183166
http://marc.info/?l=git&m=131809875619259&w=2is that "Documentation: Preparation for gitweb manpages" (originally a first patch) got removed, and two main patches got improved. Other patches are unchanged from previous version.
Pull request:
~~~~~~~~~~~~~
The following changes since commit288396994f077eec7e7db0017838a5afbfbf81e3:
Quoted 5 lines
Sync with maint (2011-10-15 20:59:50 -0700)
are available in the git repository at:
git://repo.or.cz/git/jnareb-git.gitgitweb/doc
I fetched it and compared with the result of applying this series; it appears that the version fetched from there is full of random whitespace issues, e.g. ('$' added by "cat -e")
Documentation/gitweb.txt$ +1 -1
@@ -370,12 +370,12 @@ commitdiff::$ view shows information about commit in more detail, the 'commitdiff'$ action shows changeset for given commit.$ $ -patch::$ +patch:: $ Returns the commit in plain text mail format, suitable for applying with$ linkgit:git-am[1].$
The series seems to have been rebased on a more recent 'master' and does not match the "since commit..." stated above (not a major offense; just mentioning as I noticed it).
In any case, I've queued the one from the mailing list. Thanks.