.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16. .TH CLANG-FORMAT-DIFF.PY "1" "November 2020" "clang-format-diff.py 10" "User Commands" .SH NAME clang-format-diff.py \- manual page for clang-format-diff.py 10 .SH DESCRIPTION usage: clang\-format\-diff.py [\-h] [\-i] [\-p NUM] [\-regex PATTERN] .TP [\-iregex PATTERN] [\-sort\-includes] [\-v] [\-style STYLE] [\-binary BINARY] .PP This script reads input from a unified diff and reformats all the changed lines. This is useful to reformat all the lines touched by a specific patch. Example usage for git/svn users: .IP git diff \fB\-U0\fR \fB\-\-no\-color\fR HEAD^ | clang\-format\-diff.py \fB\-p1\fR \fB\-i\fR svn diff \fB\-\-diff\-cmd\fR=\fI\,diff\/\fR \fB\-x\-U0\fR | clang\-format\-diff.py \fB\-i\fR .SS "optional arguments:" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-i\fR apply edits to files instead of displaying a diff .TP \fB\-p\fR NUM strip the smallest prefix containing P slashes .TP \fB\-regex\fR PATTERN custom pattern selecting file paths to reformat (case sensitive, overrides \fB\-iregex\fR) .TP \fB\-iregex\fR PATTERN custom pattern selecting file paths to reformat (case insensitive, overridden by \fB\-regex\fR) .TP \fB\-sort\-includes\fR let clang\-format sort include blocks .TP \fB\-v\fR, \fB\-\-verbose\fR be more verbose, ineffective without \fB\-i\fR .TP \fB\-style\fR STYLE formatting style to apply (LLVM, Google, Chromium, Mozilla, WebKit) .TP \fB\-binary\fR BINARY location of binary to use for clang\-format