The command that git will use to paginate output. Can be overridden
with the `GIT_PAGER` environment variable.
+core.whitespace::
+ A comma separated list of common whitespace problems to
+ notice. `git diff` will use `color.diff.whitespace` to
+ highlight them, and `git apply --whitespace=error` will
+ consider them as errors:
++
+* `trailing-space` treats trailing whitespaces at the end of the line
+ as an error (enabled by default).
+* `space-before-tab` treats a space character that appears immediately
+ before a tab character in the initial indent part of the line as an
+ error (enabled by default).
+* `indent-with-non-tab` treats a line that is indented with 8 or more
+ space characters that can be replaced with tab characters.
+
alias.*::
Command aliases for the gitlink:git[1] command wrapper - e.g.
after defining "alias.last = cat-file commit HEAD", the invocation
which part of the patch to use the specified color, and is one
of `plain` (context text), `meta` (metainformation), `frag`
(hunk header), `old` (removed lines), `new` (added lines),
- `commit` (commit headers), or `whitespace` (highlighting dubious
- whitespace). The values of these variables may be specified as
+ `commit` (commit headers), or `whitespace` (highlighting
+ whitespace errors). The values of these variables may be specified as
in color.branch.<slot>.
color.interactive::
The default set of branches for gitlink:git-show-branch[1].
See gitlink:git-show-branch[1].
+status.relativePaths::
+ By default, gitlink:git-status[1] shows paths relative to the
+ current directory. Setting this variable to `false` shows paths
+ relative to the repository root (this was the default for git
+ prior to v1.5.4).
+
tar.umask::
This variable can be used to restrict the permission bits of
tar archive entries. The default is 0002, which turns off the
[--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --reverse]\r
[--allow-binary-replacement | --binary] [--reject] [-z]\r
[-pNUM] [-CNUM] [--inaccurate-eof] [--cached]\r
- [--whitespace=<nowarn|warn|error|error-all|strip>]\r
+ [--whitespace=<nowarn|warn|fix|error|error-all>]\r
[--exclude=PATH] [--verbose] [<patch>…]</div></div>\r
</div>\r
<h2>DESCRIPTION</h2>\r
</p>\r
</dd>\r
<dt>\r
---whitespace=<option>\r
+--whitespace=<action>\r
</dt>\r
<dd>\r
<p>\r
- When applying a patch, detect a new or modified line\r
- that ends with trailing whitespaces (this includes a\r
- line that solely consists of whitespaces). By default,\r
- the command outputs warning messages and applies the\r
- patch.\r
- When <a href="git-apply.html">git-apply(1)</a> is used for statistics and not applying a\r
- patch, it defaults to <tt>nowarn</tt>.\r
- You can use different <tt><option></tt> to control this\r
- behavior:\r
+ When applying a patch, detect a new or modified line that has\r
+ whitespace errors. What are considered whitespace errors is\r
+ controlled by <tt>core.whitespace</tt> configuration. By default,\r
+ trailing whitespaces (including lines that solely consist of\r
+ whitespaces) and a space character that is immediately followed\r
+ by a tab character inside the initial indent of the line are\r
+ considered whitespace errors.\r
</p>\r
+<p>By default, the command outputs warning messages but applies the patch.\r
+When <a href="git-apply.html">git-apply(1)</a> is used for statistics and not applying a\r
+patch, it defaults to <tt>nowarn</tt>.</p>\r
+<p>You can use different <tt><action></tt> to control this\r
+behavior:</p>\r
<ul>\r
<li>\r
<p>\r
<li>\r
<p>\r
<tt>warn</tt> outputs warnings for a few such errors, but applies the\r
- patch (default).\r
+ patch as-is (default).\r
</p>\r
</li>\r
<li>\r
<p>\r
-<tt>error</tt> outputs warnings for a few such errors, and refuses\r
- to apply the patch.\r
+<tt>fix</tt> outputs warnings for a few such errors, and applies the\r
+ patch after fixing them (<tt>strip</tt> is a synonym --- the tool\r
+ used to consider only trailing whitespaces as errors, and the\r
+ fix involved <em>stripping</em> them, but modern gits do more).\r
</p>\r
</li>\r
<li>\r
<p>\r
-<tt>error-all</tt> is similar to <tt>error</tt> but shows all errors.\r
+<tt>error</tt> outputs warnings for a few such errors, and refuses\r
+ to apply the patch.\r
</p>\r
</li>\r
<li>\r
<p>\r
-<tt>strip</tt> outputs warnings for a few such errors, strips out the\r
- trailing whitespaces and applies the patch.\r
+<tt>error-all</tt> is similar to <tt>error</tt> but shows all errors.\r
</p>\r
</li>\r
</ul>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 14-Nov-2007 12:11:20 UTC\r
+Last updated 09-Dec-2007 10:19:06 UTC\r
</div>\r
</div>\r
</body>\r
[--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --reverse]
[--allow-binary-replacement | --binary] [--reject] [-z]
[-pNUM] [-CNUM] [--inaccurate-eof] [--cached]
- [--whitespace=<nowarn|warn|error|error-all|strip>]
+ [--whitespace=<nowarn|warn|fix|error|error-all>]
[--exclude=PATH] [--verbose] [<patch>...]
DESCRIPTION
be useful when importing patchsets, where you want to exclude certain
files or directories.
---whitespace=<option>::
- When applying a patch, detect a new or modified line
- that ends with trailing whitespaces (this includes a
- line that solely consists of whitespaces). By default,
- the command outputs warning messages and applies the
- patch.
- When gitlink:git-apply[1] is used for statistics and not applying a
- patch, it defaults to `nowarn`.
- You can use different `<option>` to control this
- behavior:
+--whitespace=<action>::
+ When applying a patch, detect a new or modified line that has
+ whitespace errors. What are considered whitespace errors is
+ controlled by `core.whitespace` configuration. By default,
+ trailing whitespaces (including lines that solely consist of
+ whitespaces) and a space character that is immediately followed
+ by a tab character inside the initial indent of the line are
+ considered whitespace errors.
++
+By default, the command outputs warning messages but applies the patch.
+When gitlink:git-apply[1] is used for statistics and not applying a
+patch, it defaults to `nowarn`.
++
+You can use different `<action>` to control this
+behavior:
+
* `nowarn` turns off the trailing whitespace warning.
* `warn` outputs warnings for a few such errors, but applies the
- patch (default).
+ patch as-is (default).
+* `fix` outputs warnings for a few such errors, and applies the
+ patch after fixing them (`strip` is a synonym --- the tool
+ used to consider only trailing whitespaces as errors, and the
+ fix involved 'stripping' them, but modern gits do more).
* `error` outputs warnings for a few such errors, and refuses
to apply the patch.
* `error-all` is similar to `error` but shows all errors.
-* `strip` outputs warnings for a few such errors, strips out the
- trailing whitespaces and applies the patch.
--inaccurate-eof::
Under certain circumstances, some versions of diff do not correctly
<div class="content">\r
<pre><tt>$ git bisect visualize</tt></pre>\r
</div></div>\r
-<p>to see the currently remaining suspects in <tt>gitk</tt>.</p>\r
+<p>to see the currently remaining suspects in <tt>gitk</tt>. <tt>visualize</tt> is a bit\r
+too long to type and <tt>view</tt> is provided as a synonym.</p>\r
+<p>If <tt>DISPLAY</tt> environment variable is not set, <tt>git log</tt> is used\r
+instead. You can even give command line options such as <tt>-p</tt> and\r
+<tt>--stat</tt>.</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git bisect view --stat</tt></pre>\r
+</div></div>\r
<h3>Bisect log and bisect replay</h3>\r
<p>The good/bad input is logged, and</p>\r
<div class="listingblock">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 14-Nov-2007 12:11:21 UTC\r
+Last updated 09-Dec-2007 10:19:06 UTC\r
</div>\r
</div>\r
</body>\r
$ git bisect visualize
------------
-to see the currently remaining suspects in `gitk`.
+to see the currently remaining suspects in `gitk`. `visualize` is a bit
+too long to type and `view` is provided as a synonym.
+
+If `DISPLAY` environment variable is not set, `git log` is used
+instead. You can even give command line options such as `-p` and
+`--stat`.
+
+------------
+$ git bisect view --stat
+------------
Bisect log and bisect replay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</dt>\r
<dd>\r
<p>\r
- This option bypasses the pre-commit hook.\r
+ This option bypasses the pre-commit and commit-msg hooks.\r
See also <a href="hooks.html">hooks</a>.\r
</p>\r
</dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 04-Dec-2007 08:28:18 UTC\r
+Last updated 09-Dec-2007 10:19:07 UTC\r
</div>\r
</div>\r
</body>\r
Add Signed-off-by line at the end of the commit message.
--no-verify::
- This option bypasses the pre-commit hook.
+ This option bypasses the pre-commit and commit-msg hooks.
See also link:hooks.html[hooks].
--allow-empty::
</p>\r
</dd>\r
<dt>\r
+core.whitespace\r
+</dt>\r
+<dd>\r
+<p>\r
+ A comma separated list of common whitespace problems to\r
+ notice. <tt>git diff</tt> will use <tt>color.diff.whitespace</tt> to\r
+ highlight them, and <tt>git apply --whitespace=error</tt> will\r
+ consider them as errors:\r
+</p>\r
+<ul>\r
+<li>\r
+<p>\r
+<tt>trailing-space</tt> treats trailing whitespaces at the end of the line\r
+ as an error (enabled by default).\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+<tt>space-before-tab</tt> treats a space character that appears immediately\r
+ before a tab character in the initial indent part of the line as an\r
+ error (enabled by default).\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+<tt>indent-with-non-tab</tt> treats a line that is indented with 8 or more\r
+ space characters that can be replaced with tab characters.\r
+</p>\r
+</li>\r
+</ul>\r
+</dd>\r
+<dt>\r
alias.*\r
</dt>\r
<dd>\r
which part of the patch to use the specified color, and is one\r
of <tt>plain</tt> (context text), <tt>meta</tt> (metainformation), <tt>frag</tt>\r
(hunk header), <tt>old</tt> (removed lines), <tt>new</tt> (added lines),\r
- <tt>commit</tt> (commit headers), or <tt>whitespace</tt> (highlighting dubious\r
- whitespace). The values of these variables may be specified as\r
+ <tt>commit</tt> (commit headers), or <tt>whitespace</tt> (highlighting\r
+ whitespace errors). The values of these variables may be specified as\r
in color.branch.<slot>.\r
</p>\r
</dd>\r
</p>\r
</dd>\r
<dt>\r
+status.relativePaths\r
+</dt>\r
+<dd>\r
+<p>\r
+ By default, <a href="git-status.html">git-status(1)</a> shows paths relative to the\r
+ current directory. Setting this variable to <tt>false</tt> shows paths\r
+ relative to the repository root (this was the default for git\r
+ prior to v1.5.4).\r
+</p>\r
+</dd>\r
+<dt>\r
tar.umask\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Dec-2007 09:49:13 UTC\r
+Last updated 09-Dec-2007 10:19:07 UTC\r
</div>\r
</div>\r
</body>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
-<p>Examines paths in the working tree that has changes unrecorded\r
-to the index file, and changes between the index file and the\r
-current HEAD commit. The former paths are what you _could_\r
-commit by running <em>git add</em> before running <em>git\r
-commit</em>, and the latter paths are what you _would_ commit by\r
-running <em>git commit</em>.</p>\r
-<p>If there is no path that is different between the index file and\r
-the current HEAD commit, the command exits with non-zero\r
-status.</p>\r
+<p>Displays paths that have differences between the index file and the\r
+current HEAD commit, paths that have differences between the working\r
+tree and the index file, and paths in the working tree that are not\r
+tracked by git (and are not ignored by <a href="gitignore.html">gitignore(5)</a>). The first\r
+are what you _would_ commit by running <tt>git commit</tt>; the second and\r
+third are what you _could_ commit by running <tt>git add</tt> before running\r
+<tt>git commit</tt>.</p>\r
<p>The command takes the same set of options as <tt>git-commit</tt>; it\r
shows what would be committed if the same options are given to\r
<tt>git-commit</tt>.</p>\r
+<p>If there is no path that is different between the index file and\r
+the current HEAD commit (i.e., there is nothing to commit by running\r
+<tt>git-commit</tt>), the command exits with non-zero status.</p>\r
<p>If any paths have been touched in the working tree (that is,\r
their modification times have changed) but their contents and\r
permissions are identical to those in the index file, the command\r
<h2>OUTPUT</h2>\r
<div class="sectionbody">\r
<p>The output from this command is designed to be used as a commit\r
-template comments, and all the output lines are prefixed with <em>#</em>.</p>\r
+template comment, and all the output lines are prefixed with <em>#</em>.</p>\r
<p>The paths mentioned in the output, unlike many other git commands, are\r
-made relative to the current directory, if you are working in a\r
-subdirectory (this is on purpose, to help cutting and pasting).</p>\r
+made relative to the current directory if you are working in a\r
+subdirectory (this is on purpose, to help cutting and pasting). See\r
+the status.relativePaths config option below.</p>\r
</div>\r
<h2>CONFIGURATION</h2>\r
<div class="sectionbody">\r
mean the same thing and the latter is kept for backward\r
compatibility) and <tt>color.status.<slot></tt> configuration variables\r
to colorize its output.</p>\r
+<p>If the config variable <tt>status.relativePaths</tt> is set to false, then all\r
+paths shown are relative to the repository root, not to the current\r
+directory.</p>\r
</div>\r
<h2>See Also</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Dec-2007 09:49:19 UTC\r
+Last updated 09-Dec-2007 10:19:07 UTC\r
</div>\r
</div>\r
</body>\r
DESCRIPTION
-----------
-Examines paths in the working tree that has changes unrecorded
-to the index file, and changes between the index file and the
-current HEAD commit. The former paths are what you _could_
-commit by running 'git add' before running 'git
-commit', and the latter paths are what you _would_ commit by
-running 'git commit'.
-
-If there is no path that is different between the index file and
-the current HEAD commit, the command exits with non-zero
-status.
+Displays paths that have differences between the index file and the
+current HEAD commit, paths that have differences between the working
+tree and the index file, and paths in the working tree that are not
+tracked by git (and are not ignored by gitlink:gitignore[5]). The first
+are what you _would_ commit by running `git commit`; the second and
+third are what you _could_ commit by running `git add` before running
+`git commit`.
The command takes the same set of options as `git-commit`; it
shows what would be committed if the same options are given to
`git-commit`.
+If there is no path that is different between the index file and
+the current HEAD commit (i.e., there is nothing to commit by running
+`git-commit`), the command exits with non-zero status.
+
If any paths have been touched in the working tree (that is,
their modification times have changed) but their contents and
permissions are identical to those in the index file, the command
OUTPUT
------
The output from this command is designed to be used as a commit
-template comments, and all the output lines are prefixed with '#'.
+template comment, and all the output lines are prefixed with '#'.
The paths mentioned in the output, unlike many other git commands, are
-made relative to the current directory, if you are working in a
-subdirectory (this is on purpose, to help cutting and pasting).
+made relative to the current directory if you are working in a
+subdirectory (this is on purpose, to help cutting and pasting). See
+the status.relativePaths config option below.
CONFIGURATION
compatibility) and `color.status.<slot>` configuration variables
to colorize its output.
+If the config variable `status.relativePaths` is set to false, then all
+paths shown are relative to the repository root, not to the current
+directory.
+
See Also
--------
gitlink:gitignore[5]
merge between common ancestors, when there are more than one.\r
When left unspecified, the driver itself is used for both\r
internal merge and the final merge.</p>\r
+<h3>Checking whitespace errors</h3>\r
+<h4><tt>whitespace</tt></h4>\r
+<p>The <tt>core.whitespace</tt> configuration variable allows you to define what\r
+<tt>diff</tt> and <tt>apply</tt> should consider whitespace errors for all paths in\r
+the project (See <a href="git-config.html">git-config(1)</a>). This attribute gives you finer\r
+control per path.</p>\r
+<dl>\r
+<dt>\r
+Set\r
+</dt>\r
+<dd>\r
+<p>\r
+ Notice all types of potential whitespace errors known to git.\r
+</p>\r
+</dd>\r
+<dt>\r
+Unset\r
+</dt>\r
+<dd>\r
+<p>\r
+ Do not notice anything as error.\r
+</p>\r
+</dd>\r
+<dt>\r
+Unspecified\r
+</dt>\r
+<dd>\r
+<p>\r
+ Use the value of <tt>core.whitespace</tt> configuration variable to\r
+ decide what to notice as error.\r
+</p>\r
+</dd>\r
+<dt>\r
+String\r
+</dt>\r
+<dd>\r
+<p>\r
+ Specify a comma separate list of common whitespace problems to\r
+ notice in the same format as <tt>core.whitespace</tt> configuration\r
+ variable.\r
+</p>\r
+</dd>\r
+</dl>\r
</div>\r
<h2>EXAMPLE</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 14-Nov-2007 12:11:57 UTC\r
+Last updated 09-Dec-2007 10:19:08 UTC\r
</div>\r
</div>\r
</body>\r
internal merge and the final merge.
+Checking whitespace errors
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`whitespace`
+^^^^^^^^^^^^
+
+The `core.whitespace` configuration variable allows you to define what
+`diff` and `apply` should consider whitespace errors for all paths in
+the project (See gitlink:git-config[1]). This attribute gives you finer
+control per path.
+
+Set::
+
+ Notice all types of potential whitespace errors known to git.
+
+Unset::
+
+ Do not notice anything as error.
+
+Unspecified::
+
+ Use the value of `core.whitespace` configuration variable to
+ decide what to notice as error.
+
+String::
+
+ Specify a comma separate list of common whitespace problems to
+ notice in the same format as `core.whitespace` configuration
+ variable.
+
+
EXAMPLE
-------