diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2019-07-23 17:34:18 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2019-07-23 17:34:18 +0000 |
| commit | 532f756555717e730166ac882e4c97ac0eeb1664 (patch) | |
| tree | fadae35b9c5e6c018d41c6f29b798c0cf3252098 /clang/tools | |
| parent | 6491076ec6800f54a8b1d09a95566b36db00f99d (diff) | |
| download | bcm5719-llvm-532f756555717e730166ac882e4c97ac0eeb1664.tar.gz bcm5719-llvm-532f756555717e730166ac882e4c97ac0eeb1664.zip | |
Improve clang-format-diff help output
The description in clang-format-diff.py is more useful than the one
in `clang-format-diff -h`, so use the same description in both places.
Differential Revision: https://reviews.llvm.org/D64998
llvm-svn: 366828
Diffstat (limited to 'clang/tools')
| -rwxr-xr-x | clang/tools/clang-format/clang-format-diff.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py index 3ba0abefc9f..a4f22ca0293 100755 --- a/clang/tools/clang-format/clang-format-diff.py +++ b/clang/tools/clang-format/clang-format-diff.py @@ -8,10 +8,7 @@ # #===------------------------------------------------------------------------===# -r""" -ClangFormat Diff Reformatter -============================ - +""" 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: @@ -35,10 +32,9 @@ else: def main(): - parser = argparse.ArgumentParser(description= - 'Reformat changed lines in diff. Without -i ' - 'option just output the diff that would be ' - 'introduced.') + parser = argparse.ArgumentParser(description=__doc__, + formatter_class= + argparse.RawDescriptionHelpFormatter) parser.add_argument('-i', action='store_true', default=False, help='apply edits to files instead of displaying a diff') parser.add_argument('-p', metavar='NUM', default=0, |

