[contrib] Prepare clang-format-diff for usage

This commit is contained in:
MarcoFalke
2016-01-06 16:11:31 +01:00
parent fa4f4b6974
commit fa074a6fd0
2 changed files with 59 additions and 7 deletions

View File

@@ -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
========================