]> granicus.if.org Git - clang/commitdiff
Add the --no-color option to the git call in the doc when using clang-format-diff
authorSylvestre Ledru <sylvestre@debian.org>
Sat, 3 Dec 2016 23:22:45 +0000 (23:22 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sat, 3 Dec 2016 23:22:45 +0000 (23:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288605 91177308-0d34-0410-b5e6-96231b3b80d8

docs/ClangFormat.rst
tools/clang-format/clang-format-diff.py

index 3f52b767e3ad914426b9c8694103ca3b4b9e9d48..dc1e2b9a7639bbef8164f9adfb17293d1f7fec14 100644 (file)
@@ -184,7 +184,7 @@ So to reformat all the lines in the latest :program:`git` commit, just do:
 
 .. code-block:: console
 
-  git diff -U0 HEAD^ | clang-format-diff.py -i -p1
+  git diff -U0 --no-color HEAD^ | clang-format-diff.py -i -p1
 
 In an SVN client, you can do:
 
index 5e728f54716985fa9c2bbc319bccdb79cf217be8..ffa30e70ddc33696a60869dfbc3b16ce59b39644 100755 (executable)
@@ -17,7 +17,7 @@ This script reads input from a unified diff and reformats all the changed
 lines. This is useful to reformat all the lines touched by a specific patch.
 Example usage for git/svn users:
 
-  git diff -U0 HEAD^ | clang-format-diff.py -p1 -i
+  git diff -U0 --no-color HEAD^ | clang-format-diff.py -p1 -i
   svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
 
 """