aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/README.md
diff options
context:
space:
mode:
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
========================