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)
llvm-svn: 288605

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

index 3f52b76..dc1e2b9 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 5e728f5..ffa30e7 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
 
 """