Skip to contentSkip to conversation

Document --check option to git diff.

PATCH In review Bill Lear 2 participants 3 messages Jun 15, 2016 Documentation

lore
Share & tools
lore

Bill Lear

author
#0 lore raw

PATCH 1/1 Document --check option to git diff.

---
 Documentation/SubmittingPatches |    3 ++-
 Documentation/diff-options.txt  |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)
Documentation/SubmittingPatches +2 -1
index 41b76d8..ce85d06 100644
@@ -23,7 +23,8 @@ probably need to split up your commit to
 
 Oh, another thing.  I am picky about whitespaces.  Make sure your
 changes do not trigger errors with the sample pre-commit hook shipped
-in templates/hooks--pre-commit.
+in templates/hooks--pre-commit.  To help ensure this does not happen,
+run git diff --check on your changes before you commit.
 
 
 (2) Generate your patch using git tools out of your commits.
Documentation/diff-options.txt +4 -0
index da1cc60..019a39f 100644
@@ -58,6 +58,10 @@
 	Turn off rename detection, even when the configuration
 	file gives the default to do so.
 
+--check::
+	Warn if changes introduce trailing whitespace
+	or an indent that uses a space before a tab.
+
 --full-index::
 	Instead of the first handful characters, show full
 	object name of pre- and post-image blob on the "index"
Signature · 1 line
1.4.4.1
author
#1 lore raw
Quoted 7 lines · On Saturday, January 27, 2007 at 07:21:53 (-0600) Bill Lear writes:

---

Documentation/SubmittingPatches |    3 ++-
Documentation/diff-options.txt  |    4 ++++
2 files changed, 6 insertions(+), 1 deletions(-)

...

Note that this does not have the change to git-diff.txt. I felt adding the example of --check was unnecessary.

Bill