[PATCH 1/3] Revert changes and extend diff option documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Revert the part of 62c6489 which says that --check affects
the exit code of "git diff"; as of da31b35 this is only true
if you pass --exit-code as well or disable the pager with
--no-pager or GIT_PAGER=cat.

Instead extend the discussion of the --exit-code switch.

Also, instead of hard-coding "what whitespace errors are",
mention that their classification can be controlled via
config and per-path attributes.

Signed-off-by: Wincent Colaiuta <win@xxxxxxxxxxx>
---
 Documentation/diff-options.txt |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 9ecc1d7..54207f0 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -92,10 +92,10 @@ endif::git-format-patch[]
 	file gives the default to do so.
 
 --check::
-	Warn if changes introduce trailing whitespace
-	or an indent that uses a space before a tab. Exits with
-	non-zero status if problems are found. Not compatible with
-	--exit-code.
+	Warn if changes introduce whitespace problems (such as
+	trailing whitespace). Configuration and per-path attributes
+	control what git classifies as a whitespace problem (see
+	gitlink:git-config[1] and gitlink:gitattributes[5]).
 
 --full-index::
 	Instead of the first handful characters, show full
@@ -197,8 +197,9 @@ endif::git-format-patch[]
 
 --exit-code::
 	Make the program exit with codes similar to diff(1).
-	That is, it exits with 1 if there were differences and
-	0 means no differences.
+	That is, it exits with 0 if there were no differences
+	and 1 if there were. If --check is used and the
+	differences introduce whitespace problems exits with 3.
 
 --quiet::
 	Disable all output of the program. Implies --exit-code.
-- 
1.5.4.rc0.1099.g76fa0-dirty

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux