diff options
| author | MarcoFalke <[email protected]> | 2016-01-06 16:11:31 +0100 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2016-01-06 16:50:06 +0100 |
| commit | fa074a6fd098153c75ba0e76b7dd94eab82ae599 (patch) | |
| tree | 4b8e5f85ba8d42b29faf2dc688e6bfcac2939a9c /contrib/devtools/README.md | |
| parent | Add clang-format-diff.py from the LLVM svn (diff) | |
| download | discoin-fa074a6fd098153c75ba0e76b7dd94eab82ae599.tar.xz discoin-fa074a6fd098153c75ba0e76b7dd94eab82ae599.zip | |
[contrib] Prepare clang-format-diff for usage
Diffstat (limited to 'contrib/devtools/README.md')
| -rw-r--r-- | contrib/devtools/README.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index 240ab6d9e..978f26b08 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -7,6 +7,18 @@ clang-format.py A script to format cpp source code according to [.clang-format](../../src/.clang-format). This should only be applied to new files or files which are currently not actively developed on. Also, git subtrees are not subject to formatting. +clang-format-diff.py +=================== + +A script to format unified git diffs according to [.clang-format](../../src/.clang-format). + +For instance, to format the last commit with 0 lines of context, +the script should be called from the git root folder as follows. + +``` +git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v +``` + fix-copyright-headers.py ======================== |