From: Junio C Hamano Date: Sun, 9 Dec 2007 10:19:33 +0000 (+0000) Subject: Autogenerated HTML docs for v1.5.3.7-1141-g4eb3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=942b35ec890f6a54de52b7f6f6f067572ba11201;p=git.git Autogenerated HTML docs for v1.5.3.7-1141-g4eb3 --- diff --git a/config.txt b/config.txt index 736fcd71c..fabe7f859 100644 --- a/config.txt +++ b/config.txt @@ -295,6 +295,20 @@ core.pager:: 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 @@ -387,8 +401,8 @@ color.diff.:: 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.. color.interactive:: @@ -762,6 +776,12 @@ showbranch.default:: 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 diff --git a/git-apply.html b/git-apply.html index ab60b25d2..5bea98553 100644 --- a/git-apply.html +++ b/git-apply.html @@ -277,7 +277,7 @@ git-apply(1) Manual Page [--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

@@ -489,20 +489,23 @@ discouraged.

---whitespace=<option> +--whitespace=<action>

- 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 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: + 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 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:

  • @@ -512,24 +515,26 @@ discouraged.

  • warn outputs warnings for a few such errors, but applies the - patch (default). + patch as-is (default).

  • -error outputs warnings for a few such errors, and refuses - to apply the patch. +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-all is similar to error but shows all errors. +error outputs warnings for a few such errors, and refuses + to apply the patch.

  • -strip outputs warnings for a few such errors, strips out the - trailing whitespaces and applies the patch. +error-all is similar to error but shows all errors.

@@ -599,7 +604,7 @@ subdirectory is checked and (if possible) updated.

diff --git a/git-apply.txt b/git-apply.txt index c1c54bfe0..bae3e7b90 100644 --- a/git-apply.txt +++ b/git-apply.txt @@ -13,7 +13,7 @@ SYNOPSIS [--apply] [--no-add] [--build-fake-ancestor ] [-R | --reverse] [--allow-binary-replacement | --binary] [--reject] [-z] [-pNUM] [-CNUM] [--inaccurate-eof] [--cached] - [--whitespace=] + [--whitespace=] [--exclude=PATH] [--verbose] [...] DESCRIPTION @@ -135,25 +135,32 @@ discouraged. be useful when importing patchsets, where you want to exclude certain files or directories. ---whitespace=

- This option bypasses the pre-commit hook. + This option bypasses the pre-commit and commit-msg hooks. See also hooks.

@@ -715,7 +715,7 @@ Junio C Hamano <junkio@cox.net>

diff --git a/git-commit.txt b/git-commit.txt index 4bb279155..426138415 100644 --- a/git-commit.txt +++ b/git-commit.txt @@ -86,7 +86,7 @@ OPTIONS 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:: diff --git a/git-config.html b/git-config.html index 65a7dbd26..c34076cc7 100644 --- a/git-config.html +++ b/git-config.html @@ -1085,6 +1085,38 @@ core.pager

+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.*
@@ -1233,8 +1265,8 @@ color.diff.<slot> 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>.

@@ -1951,6 +1983,17 @@ showbranch.default

+status.relativePaths +
+
+

+ By default, 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
@@ -2062,7 +2105,7 @@ transfer.unpackLimit diff --git a/git-status.html b/git-status.html index fa89d1cf9..870a6d98d 100644 --- a/git-status.html +++ b/git-status.html @@ -276,18 +276,19 @@ git-status(1) Manual Page

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 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 @@ -298,10 +299,11 @@ contains many paths that have been touched but not modified.

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

@@ -309,6 +311,9 @@ subdirectory (this is on purpose, to help cutting and pasting).

mean the same thing and the latter is kept for backward 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

@@ -329,7 +334,7 @@ Junio C Hamano <junkio@cox.net>.

diff --git a/git-status.txt b/git-status.txt index b0cb6bc8b..a1bb9bd82 100644 --- a/git-status.txt +++ b/git-status.txt @@ -12,21 +12,22 @@ SYNOPSIS 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 @@ -38,11 +39,12 @@ contains many paths that have been touched but not modified. 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 @@ -53,6 +55,10 @@ mean the same thing and the latter is kept for backward compatibility) and `color.status.` 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] diff --git a/gitattributes.html b/gitattributes.html index c5061f0c1..488ddc3ba 100644 --- a/gitattributes.html +++ b/gitattributes.html @@ -629,6 +629,49 @@ driver to use when the merge driver is called for an internal merge between common ancestors, when there are more than one. When left unspecified, the driver itself is used for both 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 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

@@ -703,7 +746,7 @@ commit hash.

diff --git a/gitattributes.txt b/gitattributes.txt index 19bd25f29..71c7ad76d 100644 --- a/gitattributes.txt +++ b/gitattributes.txt @@ -361,6 +361,37 @@ When left unspecified, the driver itself is used for both 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 -------