chiark / gitweb /
Merge with master
authorJonas Fonseca <fonseca@diku.dk>
Wed, 17 May 2006 11:51:20 +0000 (13:51 +0200)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Wed, 17 May 2006 11:51:20 +0000 (13:51 +0200)
README.html [new file with mode: 0644]
tig.1 [new file with mode: 0644]
tig.1.html [new file with mode: 0644]
tig.1.txt [new file with mode: 0644]

diff --git a/README.html b/README.html
new file mode 100644 (file)
index 0000000..8635164
--- /dev/null
@@ -0,0 +1,106 @@
+<div id="preamble">\r
+<div class="sectionbody">\r
+<p>Tig is a git repository browser that additionally can act as a pager for output\r
+of various git commands.</p>\r
+<p>When browsing repositories, it uses the underlying git commands to present the\r
+user with various views, such as summarized revision log and showing the commit\r
+with the log message, diffstat, and the diff.</p>\r
+<p>Using it as a pager, it will display input from stdin and try to colorize it.</p>\r
+</div>\r
+</div>\r
+<h2>Getting it</h2>\r
+<div class="sectionbody">\r
+<p>To get tig either grab the Makefile and tig.c files from the home page:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+<a href="http://jonas.nitro.dk/tig/">http://jonas.nitro.dk/tig/</a>\r
+</p>\r
+</li>\r
+</ul>\r
+<p>or clone the tig repository using the URL:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+<a href="http://jonas.nitro.dk/tig/tig.git">http://jonas.nitro.dk/tig/tig.git</a>\r
+</p>\r
+</li>\r
+</ul>\r
+<p>Documentation files are available either at the home page or in the above\r
+repository in the branch named <em>release</em>.</p>\r
+</div>\r
+<h2>Installation instructions</h2>\r
+<div class="sectionbody">\r
+<p>To install tig simply run:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ make install</tt></pre>\r
+</div></div>\r
+<p>To install documentation run:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ make install-docs</tt></pre>\r
+</div></div>\r
+<p>The following tools and packages are needed:</p>\r
+<div class="tableblock">\r
+<table rules="none"\r
+frame="hsides"\r
+cellspacing="0" cellpadding="4">\r
+<col width="365" />\r
+<col width="537" />\r
+<thead>\r
+  <tr>\r
+    <th align="left">\r
+    Tool\r
+    </th>\r
+    <th align="left">\r
+    Description\r
+    </th>\r
+  </tr>\r
+</thead>\r
+<tbody valign="top">\r
+  <tr>\r
+    <td align="left">\r
+    git-core\r
+    </td>\r
+    <td align="left">\r
+    Tig is just a frontend for git.\r
+    </td>\r
+  </tr>\r
+  <tr>\r
+    <td align="left">\r
+    ncurses\r
+    </td>\r
+    <td align="left">\r
+    Be sure to also have development files                                 installed. Usually they are available in a\r
+    </td>\r
+  </tr>\r
+  <tr>\r
+    <td align="left">\r
+    \r
+    </td>\r
+    <td align="left">\r
+    separate package ending with <tt>-dev</tt>.\r
+    </td>\r
+  </tr>\r
+  <tr>\r
+    <td align="left">\r
+    asciidoc (&gt;= 7.0), xmlto\r
+    </td>\r
+    <td align="left">\r
+    For building documentation. (Optional)\r
+    </td>\r
+  </tr>\r
+</tbody>\r
+</table>\r
+</div>\r
+<div class="admonitionblock">\r
+<table><tr>\r
+<td class="icon">\r
+<div class="title">Note</div>\r
+</td>\r
+<td class="content">You need to install the tig(1) man page in order for the internal help to\r
+be available.</td>\r
+</tr></table>\r
+</div>\r
+</div>\r
diff --git a/tig.1 b/tig.1
new file mode 100644 (file)
index 0000000..4823742
--- /dev/null
+++ b/tig.1
@@ -0,0 +1,470 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "TIG" 1 "" "" ""
+.SH NAME
+tig \- text-mode interface for git
+.SH "SYNOPSIS"
+
+.nf
+tig [options]
+tig [options] [\-\-] [git log options]
+tig [options] log  [git log options]
+tig [options] diff [git diff options]
+tig [options] show [git show options]
+tig [options] <    [git command output]
+.fi
+
+.SH "DESCRIPTION"
+
+
+Browse changes in a git repository\&. Additionally, tig(1) can also act as a pager for output of various git commands\&.
+
+
+When browsing repositories, tig(1) uses the underlying git commands to present the user with various views, such as summarized commit log and showing the commit with the log message, diffstat, and the diff\&.
+
+
+Using tig(1) as a pager, it will display input from stdin and try to colorize it\&.
+
+.SH "OPTIONS"
+
+.TP
+\-l
+Start up in log view using the internal log command\&.
+
+.TP
+\-d
+Start up in diff view using the internal diff command\&.
+
+.TP
+\-n[INTERVAL], \-\-line\-number[=INTERVAL]
+Prefix line numbers in log and diff view\&. Optionally, with interval different than each line\&.
+
+.TP
+\-t[NSPACES], \-\-tab\-size[=NSPACES]
+Set the number of spaces tabs should be expanded to\&.
+
+.TP
+\-v, \-\-version
+Show version and exit\&.
+
+.TP
+\-\-
+End of tig(1) options\&. Useful when specifying command options for the main view\&. Example:
+
+.nf
+$ tig \-\- \-\-since=1\&.month
+.fi
+
+.TP
+log [git log options]
+Open log view using the given git log options\&.
+
+.TP
+diff [git diff options]
+Open diff view using the given git diff options\&.
+
+.TP
+show [git show options]
+Open diff view using the given git show options\&.
+
+.TP
+[git log options]
+tig(1) will stop the option parsing when the first command line parameter not starting with "\-" is encountered\&. All options including this one will be passed to git log when loading the main view\&. This makes it possible to say:
+
+.nf
+$ tig tag\-1\&.0\&.\&.HEAD
+.fi
+
+.SS "Pager mode"
+
+
+If stdin is a pipe, any log or diff options will be ignored and the pager view will be opened loading data from stdin\&. The pager mode can be used for colorizing output from various git commands\&.
+
+
+Example on how to colorize the output of git\-show(1):
+
+.nf
+$ git show | tig
+.fi
+
+.SS "Git command options"
+
+
+All git command options specified on the command line will be passed to the given command and all will be shell quoted before they are passed to the shell\&.
+
+.RS
+.Sh "Note"
+
+
+If you specify options for the main view, you should not use the \-\-pretty option as this option will be set automatically to the format expected by the main view\&.
+
+.RE
+
+
+Example on how to open the log view and show both author and committer information:
+
+.nf
+$ tig log \-\-pretty=fuller
+.fi
+
+
+See the "Specifying revisions" section below for an introduction to revision options supported by the git commands\&. For details on specific git command options, refer to the man page of the command in question\&.
+
+.SH "ENVIRONMENT VARIABLES"
+
+
+Several options related to the interface with git can be configured via environment options\&.
+
+.SS "Repository references"
+
+
+Commits that are referenced by tags and branch heads will be marked by the reference name surrounded by \fI[\fR and \fI]\fR:
+
+.nf
+2006\-03\-26 19:42 Petr Baudis         | [cogito\-0\&.17\&.1] Cogito 0\&.17\&.1
+.fi
+
+
+If you want to filter out certain directories under \&.git/refs/, say tmp you can do it by setting the following variable:
+
+.nf
+$ TIG_LS_REMOTE="git ls\-remote \&. | sed /\\/tmp\\//d" tig
+.fi
+
+
+Or set the variable permanently in your environment\&.
+
+.TP
+TIG_LS_REMOTE
+Set command for retrieving all repository references\&. The command should output data in the same format as git\-ls\-remote(1)\&.
+
+.SS "View commands"
+
+
+It is possible to alter which commands are used for the different views\&. If for example you prefer commits in the main view to be sorted by date and only show 500 commits, use:
+
+.nf
+$ TIG_MAIN_CMD="git log \-\-date\-order \-n500 \-\-pretty=raw %s" tig
+.fi
+
+
+Or set the variable permanently in your environment\&.
+
+
+Notice, how %s is used to specify the commit reference\&. There can be a maximum of 5 %s ref specifications\&.
+
+.TP
+TIG_DIFF_CMD
+The command used for the diff view\&. By default, git show is used as a backend\&.
+
+.TP
+TIG_LOG_CMD
+The command used for the log view\&. If you prefer to have both author and committer shown in the log view be sure to pass \-\-pretty=fuller to git log\&.
+
+.TP
+TIG_MAIN_CMD
+The command used for the main view\&. Note, you must always specify the option: \-\-pretty=raw since the main view parser expects to read that format\&.
+
+.SH "THE VIEWER"
+
+
+tig(1) presents various \fIviews\fR of a repository\&. Each view is based on output from an external command, most often \fIgit log\fR, \fIgit diff\fR, or \fIgit show\fR\&.
+
+.TP
+The main view
+Is the default view, and it shows a one line summary of each commit in the chosen list of revision\&. The summary includes commit date, author, and the first line of the log message\&. Additionally, any repository references, such as tags, will be shown\&.
+
+.TP
+The log view
+Presents a more rich view of the revision log showing the whole log message and the diffstat\&.
+
+.TP
+The diff view
+Shows either the diff of the current working tree, that is, what has changed since the last commit, or the commit diff complete with log message, diffstat and diff\&.
+
+.TP
+The pager view
+Is used for displaying both input from stdin and output from git commands entered in the internal prompt\&.
+
+.TP
+The help view
+Displays the information from the tig(1) man page\&. For the help view to work you need to have the tig(1) man page installed\&.
+
+.SH "KEYS"
+
+
+Below the default key bindings are shown\&.
+
+.SS "View switching"
+
+.TP
+m
+Switch to main view\&.
+
+.TP
+d
+Switch to diff view\&.
+
+.TP
+l
+Switch to log view\&.
+
+.TP
+p
+Switch to pager view\&.
+
+.TP
+h
+Show man page\&.
+
+.TP
+Return
+If on a commit line show the commit diff\&. Additionally, if in main or log view this will split the view\&. To open the commit diff in full size view either use \fId\fR or press Return twice\&.
+
+.TP
+Tab
+Switch to next view\&.
+
+.SS "Cursor navigation"
+
+.TP
+Up
+Move cursor one line up\&.
+
+.TP
+Down
+Move cursor one line down\&.
+
+.TP
+k
+Move cursor one line up and enter\&. When used in the main view this will always show the diff of the current commit in the split diff view\&.
+
+.TP
+j
+Move cursor one line down and enter\&.
+
+.TP
+PgUp
+Move cursor one page up\&.
+
+.TP
+PgDown
+Move cursor one page down\&.
+
+.TP
+Home
+Jump to first line\&.
+
+.TP
+End
+Jump to last line\&.
+
+.SS "Scrolling"
+
+.TP
+Insert
+Scroll view one line up\&.
+
+.TP
+Delete
+Scroll view one line down\&.
+
+.TP
+w
+Scroll view one page up\&.
+
+.TP
+s
+Scroll view one page down\&.
+
+.SS "Misc"
+
+.TP
+q
+Quit
+
+.TP
+r
+Redraw screen\&.
+
+.TP
+z
+Stop all background loading\&. This can be useful if you use tig(1) in a repository with a long history without limiting the revision log\&.
+
+.TP
+v
+Show version\&.
+
+.TP
+n
+Toggle line numbers on/off\&.
+
+.TP
+\fI:\fR
+Open prompt\&. This allows you to specify what git command to run\&. Example:
+
+.nf
+:log \-p
+.fi
+
+.SH "REVISION SPECIFICATION"
+
+
+This section describes various ways to specify what revisions to display or otherwise limit the view to\&. tig(1) does not itself parse the described revision options so refer to the relevant git man pages for futher information\&. Relevant man pages besides git\-log(1) are git\-diff(1) and git\-rev\-list(1)\&.
+
+
+You can tune the interaction with git by making use of the options explained in this section\&. For example, by configuring the environment variables described in the "View commands" section\&.
+
+.SS "Limit by path name"
+
+
+If you are interested only in those revisions that made changes to a specific file (or even several files) list the files like this:
+
+.nf
+$ tig log Makefile
+.fi
+
+
+To avoid ambiguity with repository references such as tag name, be sure to separate file names from other git options using "\-\-"\&. So if you have a file named \fImaster\fR it will clash with the reference named \fImaster\fR, and thus you will have to use:
+
+.nf
+$ tig log \-\- master
+.fi
+
+.RS
+.Sh "Note"
+
+
+For the main view, avoiding ambiguity will in some cases require you to specify two "\-\-" options\&. The first will make tig(1) stop option processing and the latter will be passed to git log\&.
+
+.RE
+
+.SS "Limit by date or number"
+
+
+To speed up interaction with git, you can limit the amount of commits to show both for the log and main view\&. Either limit by date using e\&.g\&. \-\-since=1\&.month or limit by the number of commits using \-n400\&.
+
+
+If you are only interested in changed that happened between two dates you can use:
+
+.nf
+$ tig \-\- \-\-after=May\&.5th \-\-before=2006\-05\-16\&.15:44
+.fi
+
+.RS
+.Sh "Note"
+
+
+The dot ("\&.") is used as a separator instead of a space to avoid having to quote the option value\&. If you prefer use \-\-after="May 5th" instead of \-\-after="May 5th"\&.
+
+.RE
+
+.SS "Limiting by commit ranges"
+
+
+Alternatively, commits can be limited to a specific range, such as "all commits between \fItag\-1\&.0\fR and \fItag\-2\&.0\fR"\&. For example:
+
+.nf
+$ tig log tag\-1\&.0\&.\&.tag\-2\&.0
+.fi
+
+
+This way of commit limiting makes it trivial to only browse the commits which haven't been pushed to a remote branch\&. Assuming \fIorigin\fR is your upstream remote branch, using:
+
+.nf
+$ tig log origin\&.\&.HEAD
+.fi
+
+
+will list what will be pushed to the remote branch\&. Optionally, the ending \fIHEAD\fR can be left out since it is implied\&.
+
+.SS "Limiting by reachability"
+
+
+Git interprets the range specifier "tag\-1\&.0\&.\&.tag\-2\&.0" as "all commits reachable from \fItag\-2\&.0\fR but not from \fItag\-1\&.0\fR"\&. Where reachability refers to what commits are ancestors (or part of the history) of the branch or tagged revision in question\&.
+
+
+If you prefer to specify which commit to preview in this way use the following:
+
+.nf
+$ tig log tag\-2\&.0 ^tag\-1\&.0
+.fi
+
+
+You can think of \fI^\fR as a negation operator\&. Using this alternate syntax, it is possible to further prune commits by specifying multiple branch cut offs\&.
+
+.SS "Combining revisions specification"
+
+
+Revisions options can to some degree be combined, which makes it possible to say "show at most 20 commits from within the last month that changed files under the Documentation/ directory\&."
+
+.nf
+$ tig \-\- \-\-since=1\&.month \-n20 \-\- Documentation/
+.fi
+
+.SS "Examining all repository references"
+
+
+In some cases, it can be useful to query changes across all references in a repository\&. An example is to ask "did any line of development in this repository change a particular file within the last week"\&. This can be accomplished using:
+
+.nf
+$ tig \-\- \-\-all \-\-since=1\&.week \-\- Makefile
+.fi
+
+.SH "BUGS"
+
+
+Known bugs and problems:
+
+.TP 3
+\(bu
+If the screen width is very small the main view can draw outside the current view causing bad wrapping\&. Same goes for title and status windows\&.
+.LP
+
+.SH "TODO"
+
+
+Features that should be explored\&.
+
+.TP 3
+\(bu
+Searching\&.
+.TP
+\(bu
+Locale support\&.
+.LP
+
+.SH "COPYRIGHT"
+
+
+Copyright (c) Jonas Fonseca <fonseca@diku\&.dk>, 2006
+
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&.
+
+.SH "SEE ALSO"
+
+.nf
+git(7): \fIhttp://www.kernel.org/pub/software/scm/git/docs/\fR,
+cogito(7): \fIhttp://www.kernel.org/pub/software/scm/cogito/docs/\fR
+gitk(1): git repository browser written using tcl/tk,
+gitview(1): git repository browser written using python/gtk\&.
+.fi
+
diff --git a/tig.1.html b/tig.1.html
new file mode 100644 (file)
index 0000000..6a834f1
--- /dev/null
@@ -0,0 +1,933 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
+    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
+<style type="text/css">\r
+/* Debug borders */\r
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
+/*\r
+  border: 1px solid red;\r
+*/\r
+}\r
+\r
+body {\r
+  margin: 1em 5% 1em 5%;\r
+}\r
+\r
+a { color: blue; }\r
+a:visited { color: fuchsia; }\r
+\r
+em {\r
+  font-style: italic;\r
+}\r
+\r
+strong {\r
+  font-weight: bold;\r
+}\r
+\r
+tt {\r
+  color: navy;\r
+}\r
+\r
+h1, h2, h3, h4, h5, h6 {\r
+  color: #527bbd;\r
+  font-family: sans-serif;\r
+  margin-top: 1.2em;\r
+  margin-bottom: 0.5em;\r
+  line-height: 1.3;\r
+}\r
+\r
+h1 {\r
+  border-bottom: 2px solid silver;\r
+}\r
+h2 {\r
+  border-bottom: 2px solid silver;\r
+  padding-top: 0.5em;\r
+}\r
+\r
+div.sectionbody {\r
+  font-family: serif;\r
+  margin-left: 0;\r
+}\r
+\r
+hr {\r
+  border: 1px solid silver;\r
+}\r
+\r
+p {\r
+  margin-top: 0.5em;\r
+  margin-bottom: 0.5em;\r
+}\r
+\r
+pre {\r
+  padding: 0;\r
+  margin: 0;\r
+}\r
+\r
+span#author {\r
+  color: #527bbd;\r
+  font-family: sans-serif;\r
+  font-weight: bold;\r
+  font-size: 1.2em;\r
+}\r
+span#email {\r
+}\r
+span#revision {\r
+  font-family: sans-serif;\r
+}\r
+\r
+div#footer {\r
+  font-family: sans-serif;\r
+  font-size: small;\r
+  border-top: 2px solid silver;\r
+  padding-top: 0.5em;\r
+  margin-top: 4.0em;\r
+}\r
+div#footer-text {\r
+  float: left;\r
+  padding-bottom: 0.5em;\r
+}\r
+div#footer-badges {\r
+  float: right;\r
+  padding-bottom: 0.5em;\r
+}\r
+\r
+div#preamble,\r
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,\r
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r
+div.admonitionblock {\r
+  margin-right: 10%;\r
+  margin-top: 1.5em;\r
+  margin-bottom: 1.5em;\r
+}\r
+div.admonitionblock {\r
+  margin-top: 2.5em;\r
+  margin-bottom: 2.5em;\r
+}\r
+\r
+div.content { /* Block element content. */\r
+  padding: 0;\r
+}\r
+\r
+/* Block element titles. */\r
+div.title, caption.title {\r
+  font-family: sans-serif;\r
+  font-weight: bold;\r
+  text-align: left;\r
+  margin-top: 1.0em;\r
+  margin-bottom: 0.5em;\r
+}\r
+div.title + * {\r
+  margin-top: 0;\r
+}\r
+\r
+td div.title:first-child {\r
+  margin-top: 0.0em;\r
+}\r
+div.content div.title:first-child {\r
+  margin-top: 0.0em;\r
+}\r
+div.content + div.title {\r
+  margin-top: 0.0em;\r
+}\r
+\r
+div.sidebarblock > div.content {\r
+  background: #ffffee;\r
+  border: 1px solid silver;\r
+  padding: 0.5em;\r
+}\r
+\r
+div.listingblock > div.content {\r
+  border: 1px solid silver;\r
+  background: #f4f4f4;\r
+  padding: 0.5em;\r
+}\r
+\r
+div.quoteblock > div.content {\r
+  padding-left: 2.0em;\r
+}\r
+div.quoteblock .attribution {\r
+  text-align: right;\r
+}\r
+\r
+div.admonitionblock .icon {\r
+  vertical-align: top;\r
+  font-size: 1.1em;\r
+  font-weight: bold;\r
+  text-decoration: underline;\r
+  color: #527bbd;\r
+  padding-right: 0.5em;\r
+}\r
+div.admonitionblock td.content {\r
+  padding-left: 0.5em;\r
+  border-left: 2px solid silver;\r
+}\r
+\r
+div.exampleblock > div.content {\r
+  border-left: 2px solid silver;\r
+  padding: 0.5em;\r
+}\r
+\r
+div.verseblock div.content {\r
+  white-space: pre;\r
+}\r
+\r
+div.imageblock div.content { padding-left: 0; }\r
+div.imageblock img { border: 1px solid silver; }\r
+span.image img { border-style: none; }\r
+\r
+dl {\r
+  margin-top: 0.8em;\r
+  margin-bottom: 0.8em;\r
+}\r
+dt {\r
+  margin-top: 0.5em;\r
+  margin-bottom: 0;\r
+  font-style: italic;\r
+}\r
+dd > *:first-child {\r
+  margin-top: 0;\r
+}\r
+\r
+ul, ol {\r
+    list-style-position: outside;\r
+}\r
+ol.olist2 {\r
+  list-style-type: lower-alpha;\r
+}\r
+\r
+div.tableblock > table {\r
+  border-color: #527bbd;\r
+  border-width: 3px;\r
+}\r
+thead {\r
+  font-family: sans-serif;\r
+  font-weight: bold;\r
+}\r
+tfoot {\r
+  font-weight: bold;\r
+}\r
+\r
+div.hlist {\r
+  margin-top: 0.8em;\r
+  margin-bottom: 0.8em;\r
+}\r
+td.hlist1 {\r
+  vertical-align: top;\r
+  font-style: italic;\r
+  padding-right: 0.8em;\r
+}\r
+td.hlist2 {\r
+  vertical-align: top;\r
+}\r
+\r
+@media print {\r
+  div#footer-badges { display: none; }\r
+}\r
+include::./stylesheets/xhtml11-manpage.css[]\r
+/* Workarounds for IE6's broken and incomplete CSS2. */\r
+\r
+div.sidebar-content {\r
+  background: #ffffee;\r
+  border: 1px solid silver;\r
+  padding: 0.5em;\r
+}\r
+div.sidebar-title, div.image-title {\r
+  font-family: sans-serif;\r
+  font-weight: bold;\r
+  margin-top: 0.0em;\r
+  margin-bottom: 0.5em;\r
+}\r
+\r
+div.listingblock div.content {\r
+  border: 1px solid silver;\r
+  background: #f4f4f4;\r
+  padding: 0.5em;\r
+}\r
+\r
+div.quoteblock-content {\r
+  padding-left: 2.0em;\r
+}\r
+\r
+div.exampleblock-content {\r
+  border-left: 2px solid silver;\r
+  padding-left: 0.5em;\r
+}\r
+</style>\r
+<title>TIG(1)</title>\r
+</head>\r
+<body>\r
+<div id="header">\r
+<h1>\r
+TIG(1) Manual Page\r
+</h1>\r
+<h2>NAME</h2>\r
+<div class="sectionbody">\r
+<p>tig -\r
+   text-mode interface for git\r
+</p>\r
+</div>\r
+</div>\r
+<h2>SYNOPSIS</h2>\r
+<div class="sectionbody">\r
+<div class="verseblock">\r
+<div class="content">tig [options]\r
+tig [options] [--] [git log options]\r
+tig [options] log  [git log options]\r
+tig [options] diff [git diff options]\r
+tig [options] show [git show options]\r
+tig [options] &lt;    [git command output]</div></div>\r
+</div>\r
+<h2>DESCRIPTION</h2>\r
+<div class="sectionbody">\r
+<p>Browse changes in a git repository. Additionally, tig(1) can also act\r
+as a pager for output of various git commands.</p>\r
+<p>When browsing repositories, tig(1) uses the underlying git commands\r
+to present the user with various views, such as summarized commit log\r
+and showing the commit with the log message, diffstat, and the diff.</p>\r
+<p>Using tig(1) as a pager, it will display input from stdin and try\r
+to colorize it.</p>\r
+</div>\r
+<h2>OPTIONS</h2>\r
+<div class="sectionbody">\r
+<dl>\r
+<dt>\r
+-l\r
+</dt>\r
+<dd>\r
+<p>\r
+        Start up in log view using the internal log command.\r
+</p>\r
+</dd>\r
+<dt>\r
+-d\r
+</dt>\r
+<dd>\r
+<p>\r
+        Start up in diff view using the internal diff command.\r
+</p>\r
+</dd>\r
+<dt>\r
+-n[INTERVAL], --line-number[=INTERVAL]\r
+</dt>\r
+<dd>\r
+<p>\r
+        Prefix line numbers in log and diff view.\r
+        Optionally, with interval different than each line.\r
+</p>\r
+</dd>\r
+<dt>\r
+-t[NSPACES], --tab-size[=NSPACES]\r
+</dt>\r
+<dd>\r
+<p>\r
+        Set the number of spaces tabs should be expanded to.\r
+</p>\r
+</dd>\r
+<dt>\r
+-v, --version\r
+</dt>\r
+<dd>\r
+<p>\r
+        Show version and exit.\r
+</p>\r
+</dd>\r
+<dt>\r
+--\r
+</dt>\r
+<dd>\r
+<p>\r
+        End of tig(1) options. Useful when specifying command\r
+        options for the main view. Example:\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig -- --since=1.month</tt></pre>\r
+</div></div>\r
+</dd>\r
+<dt>\r
+log [git log options]\r
+</dt>\r
+<dd>\r
+<p>\r
+        Open log view using the given git log options.\r
+</p>\r
+</dd>\r
+<dt>\r
+diff [git diff options]\r
+</dt>\r
+<dd>\r
+<p>\r
+        Open diff view using the given git diff options.\r
+</p>\r
+</dd>\r
+<dt>\r
+show [git show options]\r
+</dt>\r
+<dd>\r
+<p>\r
+        Open diff view using the given git show options.\r
+</p>\r
+</dd>\r
+<dt>\r
+[git log options]\r
+</dt>\r
+<dd>\r
+<p>\r
+        tig(1) will stop the option parsing when the first\r
+        command line parameter not starting with "-" is\r
+        encountered. All options including this one will be\r
+        passed to git log when loading the main view.\r
+        This makes it possible to say:\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig tag-1.0..HEAD</tt></pre>\r
+</div></div>\r
+</dd>\r
+</dl>\r
+<h3>Pager mode</h3>\r
+<p>If stdin is a pipe, any log or diff options will be ignored and the\r
+pager view will be opened loading data from stdin. The pager mode\r
+can be used for colorizing output from various git commands.</p>\r
+<p>Example on how to colorize the output of git-show(1):</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ git show | tig</tt></pre>\r
+</div></div>\r
+<h3>Git command options</h3>\r
+<p>All git command options specified on the command line will\r
+be passed to the given command and all will be shell quoted\r
+before they are passed to the shell.</p>\r
+<div class="admonitionblock">\r
+<table><tr>\r
+<td class="icon">\r
+<div class="title">Note</div>\r
+</td>\r
+<td class="content">If you specify options for the main view, you should\r
+not use the <tt>--pretty</tt> option as this option will be set\r
+automatically to the format expected by the main view.</td>\r
+</tr></table>\r
+</div>\r
+<p>Example on how to open the log view and show both author and\r
+committer information:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig log --pretty=fuller</tt></pre>\r
+</div></div>\r
+<p>See the <a href="#refspec">"Specifying revisions"</a> section below\r
+for an introduction to revision options supported by the git\r
+commands. For details on specific git command options, refer\r
+to the man page of the command in question.</p>\r
+</div>\r
+<h2>ENVIRONMENT VARIABLES</h2>\r
+<div class="sectionbody">\r
+<p>Several options related to the interface with git can be configured\r
+via environment options.</p>\r
+<h3>Repository references</h3>\r
+<p>Commits that are referenced by tags and branch heads will be marked\r
+by the reference name surrounded by <em>[</em> and <em>]</em>:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>2006-03-26 19:42 Petr Baudis         | [cogito-0.17.1] Cogito 0.17.1</tt></pre>\r
+</div></div>\r
+<p>If you want to filter out certain directories under <tt>.git/refs/</tt>, say\r
+<tt>tmp</tt> you can do it by setting the following variable:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ TIG_LS_REMOTE="git ls-remote . | sed /\/tmp\//d" tig</tt></pre>\r
+</div></div>\r
+<p>Or set the variable permanently in your environment.</p>\r
+<dl>\r
+<dt>\r
+TIG_LS_REMOTE\r
+</dt>\r
+<dd>\r
+<p>\r
+        Set command for retrieving all repository references. The command\r
+        should output data in the same format as git-ls-remote(1).\r
+</p>\r
+</dd>\r
+</dl>\r
+<h3><a id="view-commands"></a>View commands</h3>\r
+<p>It is possible to alter which commands are used for the different views.\r
+If for example you prefer commits in the main view to be sorted by date\r
+and only show 500 commits, use:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig</tt></pre>\r
+</div></div>\r
+<p>Or set the variable permanently in your environment.</p>\r
+<p>Notice, how <tt>%s</tt> is used to specify the commit reference. There can\r
+be a maximum of 5 <tt>%s</tt> ref specifications.</p>\r
+<dl>\r
+<dt>\r
+TIG_DIFF_CMD\r
+</dt>\r
+<dd>\r
+<p>\r
+        The command used for the diff view. By default, git show is used\r
+        as a backend.\r
+</p>\r
+</dd>\r
+<dt>\r
+TIG_LOG_CMD\r
+</dt>\r
+<dd>\r
+<p>\r
+        The command used for the log view. If you prefer to have both\r
+        author and committer shown in the log view be sure to pass\r
+        <tt>--pretty=fuller</tt> to git log.\r
+</p>\r
+</dd>\r
+<dt>\r
+TIG_MAIN_CMD\r
+</dt>\r
+<dd>\r
+<p>\r
+        The command used for the main view. Note, you must always specify\r
+        the option: <tt>--pretty=raw</tt> since the main view parser expects to\r
+        read that format.\r
+</p>\r
+</dd>\r
+</dl>\r
+</div>\r
+<h2>The viewer</h2>\r
+<div class="sectionbody">\r
+<p>tig(1) presents various <em>views</em> of a repository. Each view is based on output\r
+from an external command, most often <em>git log</em>, <em>git diff</em>, or <em>git show</em>.</p>\r
+<dl>\r
+<dt>\r
+The main view\r
+</dt>\r
+<dd>\r
+<p>\r
+        Is the default view, and it shows a one line summary of each commit\r
+        in the chosen list of revision. The summary includes commit date,\r
+        author, and the first line of the log message. Additionally, any\r
+        repository references, such as tags, will be shown.\r
+</p>\r
+</dd>\r
+<dt>\r
+The log view\r
+</dt>\r
+<dd>\r
+<p>\r
+        Presents a more rich view of the revision log showing the whole log\r
+        message and the diffstat.\r
+</p>\r
+</dd>\r
+<dt>\r
+The diff view\r
+</dt>\r
+<dd>\r
+<p>\r
+        Shows either the diff of the current working tree, that is, what\r
+        has changed since the last commit, or the commit diff complete\r
+        with log message, diffstat and diff.\r
+</p>\r
+</dd>\r
+<dt>\r
+The pager view\r
+</dt>\r
+<dd>\r
+<p>\r
+        Is used for displaying both input from stdin and output from git\r
+        commands entered in the internal prompt.\r
+</p>\r
+</dd>\r
+<dt>\r
+The help view\r
+</dt>\r
+<dd>\r
+<p>\r
+        Displays the information from the tig(1) man page. For the help view\r
+        to work you need to have the tig(1) man page installed.\r
+</p>\r
+</dd>\r
+</dl>\r
+</div>\r
+<h2>KEYS</h2>\r
+<div class="sectionbody">\r
+<p>Below the default key bindings are shown.</p>\r
+<h3>View switching</h3>\r
+<dl>\r
+<dt>\r
+m\r
+</dt>\r
+<dd>\r
+<p>\r
+        Switch to main view.\r
+</p>\r
+</dd>\r
+<dt>\r
+d\r
+</dt>\r
+<dd>\r
+<p>\r
+        Switch to diff view.\r
+</p>\r
+</dd>\r
+<dt>\r
+l\r
+</dt>\r
+<dd>\r
+<p>\r
+        Switch to log view.\r
+</p>\r
+</dd>\r
+<dt>\r
+p\r
+</dt>\r
+<dd>\r
+<p>\r
+        Switch to pager view.\r
+</p>\r
+</dd>\r
+<dt>\r
+h\r
+</dt>\r
+<dd>\r
+<p>\r
+        Show man page.\r
+</p>\r
+</dd>\r
+<dt>\r
+Return\r
+</dt>\r
+<dd>\r
+<p>\r
+        If on a commit line show the commit diff. Additionally, if in\r
+        main or log view this will split the view. To open the commit\r
+        diff in full size view either use <em>d</em> or press Return twice.\r
+</p>\r
+</dd>\r
+<dt>\r
+Tab\r
+</dt>\r
+<dd>\r
+<p>\r
+        Switch to next view.\r
+</p>\r
+</dd>\r
+</dl>\r
+<h3>Cursor navigation</h3>\r
+<dl>\r
+<dt>\r
+Up\r
+</dt>\r
+<dd>\r
+<p>\r
+        Move cursor one line up.\r
+</p>\r
+</dd>\r
+<dt>\r
+Down\r
+</dt>\r
+<dd>\r
+<p>\r
+        Move cursor one line down.\r
+</p>\r
+</dd>\r
+<dt>\r
+k\r
+</dt>\r
+<dd>\r
+<p>\r
+        Move cursor one line up and enter. When used in the main view\r
+        this will always show the diff of the current commit in the\r
+        split diff view.\r
+</p>\r
+</dd>\r
+<dt>\r
+j\r
+</dt>\r
+<dd>\r
+<p>\r
+        Move cursor one line down and enter.\r
+</p>\r
+</dd>\r
+<dt>\r
+PgUp\r
+</dt>\r
+<dd>\r
+<p>\r
+        Move cursor one page up.\r
+</p>\r
+</dd>\r
+<dt>\r
+PgDown\r
+</dt>\r
+<dd>\r
+<p>\r
+        Move cursor one page down.\r
+</p>\r
+</dd>\r
+<dt>\r
+Home\r
+</dt>\r
+<dd>\r
+<p>\r
+        Jump to first line.\r
+</p>\r
+</dd>\r
+<dt>\r
+End\r
+</dt>\r
+<dd>\r
+<p>\r
+        Jump to last line.\r
+</p>\r
+</dd>\r
+</dl>\r
+<h3>Scrolling</h3>\r
+<dl>\r
+<dt>\r
+Insert\r
+</dt>\r
+<dd>\r
+<p>\r
+        Scroll view one line up.\r
+</p>\r
+</dd>\r
+<dt>\r
+Delete\r
+</dt>\r
+<dd>\r
+<p>\r
+        Scroll view one line down.\r
+</p>\r
+</dd>\r
+<dt>\r
+w\r
+</dt>\r
+<dd>\r
+<p>\r
+        Scroll view one page up.\r
+</p>\r
+</dd>\r
+<dt>\r
+s\r
+</dt>\r
+<dd>\r
+<p>\r
+        Scroll view one page down.\r
+</p>\r
+</dd>\r
+</dl>\r
+<h3>Misc</h3>\r
+<dl>\r
+<dt>\r
+q\r
+</dt>\r
+<dd>\r
+<p>\r
+        Quit\r
+</p>\r
+</dd>\r
+<dt>\r
+r\r
+</dt>\r
+<dd>\r
+<p>\r
+        Redraw screen.\r
+</p>\r
+</dd>\r
+<dt>\r
+z\r
+</dt>\r
+<dd>\r
+<p>\r
+        Stop all background loading. This can be useful if you use\r
+        tig(1) in a repository with a long history without limiting\r
+        the revision log.\r
+</p>\r
+</dd>\r
+<dt>\r
+v\r
+</dt>\r
+<dd>\r
+<p>\r
+        Show version.\r
+</p>\r
+</dd>\r
+<dt>\r
+n\r
+</dt>\r
+<dd>\r
+<p>\r
+        Toggle line numbers on/off.\r
+</p>\r
+</dd>\r
+<dt>\r
+<em>:</em>\r
+</dt>\r
+<dd>\r
+<p>\r
+        Open prompt. This allows you to specify what git command\r
+        to run. Example:\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>:log -p</tt></pre>\r
+</div></div>\r
+</dd>\r
+</dl>\r
+</div>\r
+<h2><a id="refspec"></a>Revision specification</h2>\r
+<div class="sectionbody">\r
+<p>This section describes various ways to specify what revisions to display\r
+or otherwise limit the view to. tig(1) does not itself parse the described\r
+revision options so refer to the relevant git man pages for futher\r
+information. Relevant man pages besides git-log(1) are git-diff(1) and\r
+git-rev-list(1).</p>\r
+<p>You can tune the interaction with git by making use of the options\r
+explained in this section. For example, by configuring the environment\r
+variables described in the  <a href="#view-commands">"View commands"</a> section.</p>\r
+<h3>Limit by path name</h3>\r
+<p>If you are interested only in those revisions that made changes to a\r
+specific file (or even several files) list the files like this:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig log Makefile</tt></pre>\r
+</div></div>\r
+<p>To avoid ambiguity with repository references such as tag name, be sure\r
+to separate file names from other git options using "--". So if you\r
+have a file named <em>master</em> it will clash with the reference named\r
+<em>master</em>, and thus you will have to use:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig log -- master</tt></pre>\r
+</div></div>\r
+<div class="admonitionblock">\r
+<table><tr>\r
+<td class="icon">\r
+<div class="title">Note</div>\r
+</td>\r
+<td class="content">For the main view, avoiding ambiguity will in some cases require\r
+you to specify two "--" options. The first will make tig(1) stop\r
+option processing and the latter will be passed to git log.</td>\r
+</tr></table>\r
+</div>\r
+<h3>Limit by date or number</h3>\r
+<p>To speed up interaction with git, you can limit the amount of commits\r
+to show both for the log and main view. Either limit by date using\r
+e.g. <tt>--since=1.month</tt> or limit by the number of commits using <tt>-n400</tt>.</p>\r
+<p>If you are only interested in changed that happened between two dates\r
+you can use:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig -- --after=May.5th --before=2006-05-16.15:44</tt></pre>\r
+</div></div>\r
+<div class="admonitionblock">\r
+<table><tr>\r
+<td class="icon">\r
+<div class="title">Note</div>\r
+</td>\r
+<td class="content">The dot (".") is used as a separator instead of a space to avoid\r
+having to quote the option value. If you prefer use <tt>--after="May 5th"</tt>\r
+instead of <tt>--after="May 5th"</tt>.</td>\r
+</tr></table>\r
+</div>\r
+<h3>Limiting by commit ranges</h3>\r
+<p>Alternatively, commits can be limited to a specific range, such as\r
+"all commits between <em>tag-1.0</em> and <em>tag-2.0</em>". For example:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig log tag-1.0..tag-2.0</tt></pre>\r
+</div></div>\r
+<p>This way of commit limiting makes it trivial to only browse the commits\r
+which haven't been pushed to a remote branch. Assuming <em>origin</em> is your\r
+upstream remote branch, using:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig log origin..HEAD</tt></pre>\r
+</div></div>\r
+<p>will list what will be pushed to the remote branch. Optionally, the ending\r
+<em>HEAD</em> can be left out since it is implied.</p>\r
+<h3>Limiting by reachability</h3>\r
+<p>Git interprets the range specifier "tag-1.0..tag-2.0" as\r
+"all commits reachable from <em>tag-2.0</em> but not from <em>tag-1.0</em>".\r
+Where reachability refers to what commits are ancestors (or part of the\r
+history) of the branch or tagged revision in question.</p>\r
+<p>If you prefer to specify which commit to preview in this way use the\r
+following:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig log tag-2.0 ^tag-1.0</tt></pre>\r
+</div></div>\r
+<p>You can think of <em>^</em> as a negation operator. Using this alternate syntax,\r
+it is possible to further prune commits by specifying multiple branch\r
+cut offs.</p>\r
+<h3>Combining revisions specification</h3>\r
+<p>Revisions options can to some degree be combined, which makes it possible\r
+to say "show at most 20 commits from within the last month that changed\r
+files under the Documentation/ directory."</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig -- --since=1.month -n20 -- Documentation/</tt></pre>\r
+</div></div>\r
+<h3>Examining all repository references</h3>\r
+<p>In some cases, it can be useful to query changes across all references\r
+in a repository. An example is to ask "did any line of development in\r
+this repository change a particular file within the last week". This\r
+can be accomplished using:</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>$ tig -- --all --since=1.week -- Makefile</tt></pre>\r
+</div></div>\r
+</div>\r
+<h2>BUGS</h2>\r
+<div class="sectionbody">\r
+<p>Known bugs and problems:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+If the screen width is very small the main view can draw\r
+outside the current view causing bad wrapping. Same goes\r
+for title and status windows.\r
+</p>\r
+</li>\r
+</ul>\r
+</div>\r
+<h2>TODO</h2>\r
+<div class="sectionbody">\r
+<p>Features that should be explored.</p>\r
+<ul>\r
+<li>\r
+<p>\r
+Searching.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Locale support.\r
+</p>\r
+</li>\r
+</ul>\r
+</div>\r
+<h2>COPYRIGHT</h2>\r
+<div class="sectionbody">\r
+<p>Copyright (c) Jonas Fonseca &lt;fonseca@diku.dk&gt;, 2006</p>\r
+<p>This program is free software; you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation; either version 2 of the License, or\r
+(at your option) any later version.</p>\r
+</div>\r
+<h2>SEE ALSO</h2>\r
+<div class="sectionbody">\r
+<div class="verseblock">\r
+<div class="content"><a href="http://www.kernel.org/pub/software/scm/git/docs/">git(7)</a>,\r
+<a href="http://www.kernel.org/pub/software/scm/cogito/docs/">cogito(7)</a>\r
+gitk(1): git repository browser written using tcl/tk,\r
+gitview(1): git repository browser written using python/gtk.</div></div>\r
+</div>\r
+<div id="footer">\r
+<div id="footer-text">\r
+Last updated 17-May-2006 12:54:05 CEST\r
+</div>\r
+</div>\r
+</body>\r
+</html>\r
diff --git a/tig.1.txt b/tig.1.txt
new file mode 100644 (file)
index 0000000..0f84af0
--- /dev/null
+++ b/tig.1.txt
@@ -0,0 +1,385 @@
+TIG(1)
+======
+
+NAME
+----
+tig - text-mode interface for git
+
+SYNOPSIS
+--------
+[verse]
+tig [options]
+tig [options] [--] [git log options]
+tig [options] log  [git log options]
+tig [options] diff [git diff options]
+tig [options] show [git show options]
+tig [options] <    [git command output]
+
+DESCRIPTION
+-----------
+Browse changes in a git repository. Additionally, tig(1) can also act
+as a pager for output of various git commands.
+
+When browsing repositories, tig(1) uses the underlying git commands
+to present the user with various views, such as summarized commit log
+and showing the commit with the log message, diffstat, and the diff.
+
+Using tig(1) as a pager, it will display input from stdin and try
+to colorize it.
+
+OPTIONS
+-------
+
+-l::
+       Start up in log view using the internal log command.
+
+-d::
+       Start up in diff view using the internal diff command.
+
+-n[INTERVAL], --line-number[=INTERVAL]::
+       Prefix line numbers in log and diff view.
+       Optionally, with interval different than each line.
+
+-t[NSPACES], --tab-size[=NSPACES]::
+       Set the number of spaces tabs should be expanded to.
+
+-v, --version::
+       Show version and exit.
+
+\--::
+       End of tig(1) options. Useful when specifying command
+       options for the main view. Example:
+
+               $ tig -- --since=1.month
+
+log [git log options]::
+       Open log view using the given git log options.
+
+diff [git diff options]::
+       Open diff view using the given git diff options.
+
+show [git show options]::
+       Open diff view using the given git show options.
+
+[git log options]::
+       tig(1) will stop the option parsing when the first
+       command line parameter not starting with "-" is
+       encountered. All options including this one will be
+       passed to git log when loading the main view.
+       This makes it possible to say:
+
+       $ tig tag-1.0..HEAD
+
+Pager mode
+~~~~~~~~~~
+If stdin is a pipe, any log or diff options will be ignored and the
+pager view will be opened loading data from stdin. The pager mode
+can be used for colorizing output from various git commands.
+
+Example on how to colorize the output of git-show(1):
+
+       $ git show | tig
+
+Git command options
+~~~~~~~~~~~~~~~~~~~
+All git command options specified on the command line will
+be passed to the given command and all will be shell quoted
+before they are passed to the shell.
+
+NOTE: If you specify options for the main view, you should
+not use the `--pretty` option as this option will be set
+automatically to the format expected by the main view.
+
+Example on how to open the log view and show both author and
+committer information:
+
+       $ tig log --pretty=fuller
+
+See the <<refspec, "Specifying revisions">> section below
+for an introduction to revision options supported by the git
+commands. For details on specific git command options, refer
+to the man page of the command in question.
+
+ENVIRONMENT VARIABLES
+---------------------
+Several options related to the interface with git can be configured
+via environment options.
+
+Repository references
+~~~~~~~~~~~~~~~~~~~~~
+Commits that are referenced by tags and branch heads will be marked
+by the reference name surrounded by '[' and ']':
+
+       2006-03-26 19:42 Petr Baudis         | [cogito-0.17.1] Cogito 0.17.1
+
+If you want to filter out certain directories under `.git/refs/`, say
+`tmp` you can do it by setting the following variable:
+
+       $ TIG_LS_REMOTE="git ls-remote . | sed /\/tmp\//d" tig
+
+Or set the variable permanently in your environment.
+
+TIG_LS_REMOTE::
+       Set command for retrieving all repository references. The command
+       should output data in the same format as git-ls-remote(1).
+
+[[view-commands]]
+View commands
+~~~~~~~~~~~~~
+It is possible to alter which commands are used for the different views.
+If for example you prefer commits in the main view to be sorted by date
+and only show 500 commits, use:
+
+       $ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig
+
+Or set the variable permanently in your environment.
+
+Notice, how `%s` is used to specify the commit reference. There can
+be a maximum of 5 `%s` ref specifications.
+
+TIG_DIFF_CMD::
+       The command used for the diff view. By default, git show is used
+       as a backend.
+
+TIG_LOG_CMD::
+       The command used for the log view. If you prefer to have both
+       author and committer shown in the log view be sure to pass
+       `--pretty=fuller` to git log.
+
+TIG_MAIN_CMD::
+       The command used for the main view. Note, you must always specify
+       the option: `--pretty=raw` since the main view parser expects to
+       read that format.
+
+The viewer
+----------
+
+tig(1) presents various 'views' of a repository. Each view is based on output
+from an external command, most often 'git log', 'git diff', or 'git show'.
+
+The main view::
+       Is the default view, and it shows a one line summary of each commit
+       in the chosen list of revision. The summary includes commit date,
+       author, and the first line of the log message. Additionally, any
+       repository references, such as tags, will be shown.
+
+The log view::
+       Presents a more rich view of the revision log showing the whole log
+       message and the diffstat.
+
+The diff view::
+       Shows either the diff of the current working tree, that is, what
+       has changed since the last commit, or the commit diff complete
+       with log message, diffstat and diff.
+
+The pager view::
+       Is used for displaying both input from stdin and output from git
+       commands entered in the internal prompt.
+
+The help view::
+       Displays the information from the tig(1) man page. For the help view
+       to work you need to have the tig(1) man page installed.
+
+KEYS
+----
+Below the default key bindings are shown.
+
+View switching
+~~~~~~~~~~~~~~
+m::
+       Switch to main view.
+d::
+       Switch to diff view.
+l::
+       Switch to log view.
+p::
+       Switch to pager view.
+h::
+       Show man page.
+Return::
+       If on a commit line show the commit diff. Additionally, if in
+       main or log view this will split the view. To open the commit
+       diff in full size view either use 'd' or press Return twice.
+Tab::
+       Switch to next view.
+
+Cursor navigation
+~~~~~~~~~~~~~~~~~
+Up::
+       Move cursor one line up.
+Down::
+       Move cursor one line down.
+k::
+       Move cursor one line up and enter. When used in the main view
+       this will always show the diff of the current commit in the
+       split diff view.
+j::
+       Move cursor one line down and enter.
+PgUp::
+       Move cursor one page up.
+PgDown::
+       Move cursor one page down.
+Home::
+       Jump to first line.
+End::
+       Jump to last line.
+
+Scrolling
+~~~~~~~~~
+Insert::
+       Scroll view one line up.
+Delete::
+       Scroll view one line down.
+w::
+       Scroll view one page up.
+s::
+       Scroll view one page down.
+
+Misc
+~~~~
+q::
+       Quit
+r::
+       Redraw screen.
+z::
+       Stop all background loading. This can be useful if you use
+       tig(1) in a repository with a long history without limiting
+       the revision log.
+v::
+       Show version.
+n::
+       Toggle line numbers on/off.
+':'::
+       Open prompt. This allows you to specify what git command
+       to run. Example:
+
+       :log -p
+
+[[refspec]]
+Revision specification
+----------------------
+This section describes various ways to specify what revisions to display
+or otherwise limit the view to. tig(1) does not itself parse the described
+revision options so refer to the relevant git man pages for futher
+information. Relevant man pages besides git-log(1) are git-diff(1) and
+git-rev-list(1).
+
+You can tune the interaction with git by making use of the options
+explained in this section. For example, by configuring the environment
+variables described in the  <<view-commands, "View commands">> section.
+
+Limit by path name
+~~~~~~~~~~~~~~~~~~
+If you are interested only in those revisions that made changes to a
+specific file (or even several files) list the files like this:
+
+       $ tig log Makefile
+
+To avoid ambiguity with repository references such as tag name, be sure
+to separate file names from other git options using "\--". So if you
+have a file named 'master' it will clash with the reference named
+'master', and thus you will have to use:
+
+       $ tig log -- master
+
+NOTE: For the main view, avoiding ambiguity will in some cases require
+you to specify two "\--" options. The first will make tig(1) stop
+option processing and the latter will be passed to git log.
+
+Limit by date or number
+~~~~~~~~~~~~~~~~~~~~~~~
+To speed up interaction with git, you can limit the amount of commits
+to show both for the log and main view. Either limit by date using
+e.g. `--since=1.month` or limit by the number of commits using `-n400`.
+
+If you are only interested in changed that happened between two dates
+you can use:
+
+       $ tig -- --after=May.5th --before=2006-05-16.15:44
+
+NOTE: The dot (".") is used as a separator instead of a space to avoid
+having to quote the option value. If you prefer use `--after="May 5th"`
+instead of `--after="May 5th"`.
+
+Limiting by commit ranges
+~~~~~~~~~~~~~~~~~~~~~~~~~
+Alternatively, commits can be limited to a specific range, such as
+"all commits between 'tag-1.0' and 'tag-2.0'". For example:
+
+       $ tig log tag-1.0..tag-2.0
+
+This way of commit limiting makes it trivial to only browse the commits
+which haven't been pushed to a remote branch. Assuming 'origin' is your
+upstream remote branch, using:
+
+       $ tig log origin..HEAD
+
+will list what will be pushed to the remote branch. Optionally, the ending
+'HEAD' can be left out since it is implied.
+
+Limiting by reachability
+~~~~~~~~~~~~~~~~~~~~~~~~
+Git interprets the range specifier "tag-1.0..tag-2.0" as
+"all commits reachable from 'tag-2.0' but not from 'tag-1.0'".
+Where reachability refers to what commits are ancestors (or part of the
+history) of the branch or tagged revision in question.
+
+If you prefer to specify which commit to preview in this way use the
+following:
+
+       $ tig log tag-2.0 ^tag-1.0
+
+You can think of '^' as a negation operator. Using this alternate syntax,
+it is possible to further prune commits by specifying multiple branch
+cut offs.
+
+Combining revisions specification
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Revisions options can to some degree be combined, which makes it possible
+to say "show at most 20 commits from within the last month that changed
+files under the Documentation/ directory."
+
+       $ tig -- --since=1.month -n20 -- Documentation/
+
+Examining all repository references
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In some cases, it can be useful to query changes across all references
+in a repository. An example is to ask "did any line of development in
+this repository change a particular file within the last week". This
+can be accomplished using:
+
+       $ tig -- --all --since=1.week -- Makefile
+
+BUGS
+----
+Known bugs and problems:
+
+- If the screen width is very small the main view can draw
+outside the current view causing bad wrapping. Same goes
+for title and status windows.
+
+TODO
+----
+Features that should be explored.
+
+- Searching.
+
+- Locale support.
+
+COPYRIGHT
+---------
+Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2006
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+SEE ALSO
+--------
+[verse]
+link:http://www.kernel.org/pub/software/scm/git/docs/[git(7)],
+link:http://www.kernel.org/pub/software/scm/cogito/docs/[cogito(7)]
+gitk(1): git repository browser written using tcl/tk,
+gitview(1): git repository browser written using python/gtk.
+