diff options
author | Alp Toker <alp@nuanti.com> | 2013-12-04 00:48:22 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-12-04 00:48:22 +0000 |
commit | 0e7f6da674c2870bc69fdd2a6b3fcaf49bbdd5f5 (patch) | |
tree | b68ea06e7805c4a14b81b524008bfbb8dbc40c56 /clang | |
parent | f95fe9b870e6b459d69b87b34621579752bc0bbe (diff) | |
download | bcm5719-llvm-0e7f6da674c2870bc69fdd2a6b3fcaf49bbdd5f5.tar.gz bcm5719-llvm-0e7f6da674c2870bc69fdd2a6b3fcaf49bbdd5f5.zip |
clang-format-diff.py: Fix 'beintroduced' in help output
Also update docs to reflect recently changed -i inplace edit behaviour.
llvm-svn: 196336
Diffstat (limited to 'clang')
-rw-r--r-- | clang/docs/ClangFormat.rst | 10 | ||||
-rwxr-xr-x | clang/tools/clang-format/clang-format-diff.py | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst index bc6b8a2c41f..d760bbb340e 100644 --- a/clang/docs/ClangFormat.rst +++ b/clang/docs/ClangFormat.rst @@ -146,7 +146,7 @@ shortcut in the BBEdit preferences, under Menus & Shortcuts. Visual Studio Integration ========================= -Download the latest Visual Studio plugin from the `alpha build site +Download the latest Visual Studio extension from the `alpha build site <http://llvm.org/builds/>`_. The default key-binding is Ctrl-R,Ctrl-F. @@ -158,12 +158,14 @@ a unified diff and reformats all contained lines with :program:`clang-format`. .. code-block:: console - usage: clang-format-diff.py [-h] [-p P] [-style STYLE] + usage: clang-format-diff.py [-h] [-i] [-p P] [-style STYLE] - Reformat changed lines in diff. + Reformat changed lines in diff. Without -i option just output the diff that + would be introduced. optional arguments: -h, --help show this help message and exit + -i apply edits to files instead of displaying a diff -p P strip the smallest prefix containing P slashes -style STYLE formatting style to apply (LLVM, Google, Chromium, Mozilla, WebKit) @@ -172,7 +174,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 -p1 + git diff -U0 HEAD^ | clang-format-diff.py -i -p1 The :option:`-U0` will create a diff without context lines (the script would format those as well). diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py index 60b8fb730dc..b042d957af0 100755 --- a/clang/tools/clang-format/clang-format-diff.py +++ b/clang/tools/clang-format/clang-format-diff.py @@ -37,7 +37,7 @@ binary = 'clang-format' def main(): parser = argparse.ArgumentParser(description= 'Reformat changed lines in diff. Without -i ' - 'option just output the diff that would be' + 'option just output the diff that would be ' 'introduced.') parser.add_argument('-i', action='store_true', default=False, help='apply edits to files instead of displaying a diff') |