diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py --- a/clang/tools/clang-format/clang-format-diff.py +++ b/clang/tools/clang-format/clang-format-diff.py @@ -13,7 +13,7 @@ lines. This is useful to reformat all the lines touched by a specific patch. Example usage for git/svn users: - git diff -U0 --no-color HEAD^ | clang-format-diff.py -p1 -i + git diff -U0 --no-color --relative HEAD^ | clang-format-diff.py -p1 -i svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i """ @@ -36,7 +36,9 @@ formatter_class= argparse.RawDescriptionHelpFormatter) parser.add_argument('-i', action='store_true', default=False, - help='apply edits to files instead of displaying a diff') + help='apply edits to files instead of displaying a diff.' + ' The filename contained in the diff is used unmodified' + ' to determine the source file to update') parser.add_argument('-p', metavar='NUM', default=0, help='strip the smallest prefix containing P slashes') parser.add_argument('-regex', metavar='PATTERN', default=None,