From: Sylvestre Ledru Date: Sat, 3 Dec 2016 23:22:45 +0000 (+0000) Subject: Add the --no-color option to the git call in the doc when using clang-format-diff X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=135e2ef91ad3b7d3c99960a13f72fba01d23845a;p=clang Add the --no-color option to the git call in the doc when using clang-format-diff git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288605 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/ClangFormat.rst b/docs/ClangFormat.rst index 3f52b767e3..dc1e2b9a76 100644 --- a/docs/ClangFormat.rst +++ b/docs/ClangFormat.rst @@ -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: diff --git a/tools/clang-format/clang-format-diff.py b/tools/clang-format/clang-format-diff.py index 5e728f5471..ffa30e70dd 100755 --- a/tools/clang-format/clang-format-diff.py +++ b/tools/clang-format/clang-format-diff.py @@ -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 """