* 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 underlaying 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.
*
/**
* \--::
- * End of tig(1) options. Useful when specifying commands
- * for the main view. Example:
+ * End of tig(1) options. Useful when specifying command
+ * options for the main view. Example:
*
* $ tig -- --since=1.month
**/
}
/**
- * log [options]::
+ * log [git log options]::
* Open log view using the given git log options.
*
- * diff [options]::
+ * diff [git diff options]::
* Open diff view using the given git diff options.
*
- * show [options]::
+ * show [git show options]::
* Open diff view using the given git show options.
**/
if (!strcmp(opt, "log") ||
break;
}
- /* Make stuff like:
+ /**
+ * [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
- *
- * work. */
+ **/
if (opt[0] && opt[0] != '-')
break;
*
* $ tig log --pretty=fuller
*
- * 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.
+ * 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.
**/
if (opt_request == REQ_VIEW_MAIN)
"git ls-remote ."
/**
+ * [[view-commands]]
* View commands
* ~~~~~~~~~~~~~
* It is possible to alter which commands are used for the different views.
#define TIG_MAIN_CMD \
"git log --topo-order --stat --pretty=raw %s"
-/* We silently ignore that the following are also exported. */
+/* ... silently ignore that the following are also exported. */
#define TIG_HELP_CMD \
"man tig 2> /dev/null"
* h::
* Show man page.
* Return::
- * If on a commit line show the commit diff. Addiionally, if in
+ * 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::
* Cursor navigation
* ~~~~~~~~~~~~~~~~~
* Up::
- * Move curser one line up.
+ * Move cursor one line up.
* Down::
* Move cursor one line down.
* k::
- * Move curser one line up and enter. When used in the main view
+ * 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 curser one page up.
+ * Move cursor one page up.
* PgDown::
* Move cursor one page down.
* Home::
* z::
* Stop all background loading. This can be useful if you use
* tig(1) in a repository with a long history without limiting
- * the log output.
+ * the revision log.
* v::
* Show version.
* n::
}
/**
+ * [[refspec]]
* Specifying revisions
* --------------------
- * This section describes various ways to specify what revisions to
- * display or otherwise limit the view to.
+ * This section describes various ways to specify what revisions to display
+ * or otherwise limit the view to. Note, that tig(1) does not itself parse
+ * the described revision options.
*
* Limit by date or number
* ~~~~~~~~~~~~~~~~~~~~~~~
* e.g. `--since=1.month` or limit by the number of commits using `-n400`.
*
* NOTE: You can tune the interaction with git by making use of the options
- * explained in this section.
- *
- * NOTE: tig(1) does not itself parse the revision options
- * described in this section.
+ * explained in this section. For example, by configuring the environment
+ * variables described in the <<view-commands, "View commands">> section.
*
* Ranges
* ~~~~~~
*
* $ tig log tag-2.0 ^tag-1.0
*
- * You can think of '^' as a negator. Using this alternate syntax, it is
- * possible to furthur prune commits by specifying multiple negators.
+ * 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.
*
* BUGS
* ----