aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/README.md
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-01-06 16:11:31 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-01-06 16:50:06 +0100
commitfa074a6fd098153c75ba0e76b7dd94eab82ae599 (patch)
tree4b8e5f85ba8d42b29faf2dc688e6bfcac2939a9c /contrib/devtools/README.md
parentfa4f4b6974cedd0689726a7eb791eb8f2d1d66ed (diff)
[contrib] Prepare clang-format-diff for usage
Diffstat (limited to 'contrib/devtools/README.md')
-rw-r--r--contrib/devtools/README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md
index 240ab6d9e0..978f26b084 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
========================