Starting from llvm/llvm-project#70883 (around LLVM version 18.1.0), the clang-format-diff script now will exit with a non-zero status code if it detects there has formatting changes.
And this change from LLVM clang-format will break the assuming in apply-format script, here at L329,
|
"${git_args[@]}" "$@" \ |
|
| "${format_diff_args[@]}" \ |
|
-p1 \ |
|
-style="$style" \ |
|
-iregex="$exclusions_regex"'.*\.(c|cpp|cxx|cc|h|hpp|m|mm|js|java)' \ |
|
> "$patch_dest" \ |
|
|| exit 1 |
which stops apply-format to apply the diff as format fix to the local or git-staged files.