We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7773753 + b7d9251 commit 0cef260Copy full SHA for 0cef260
apply-format
@@ -329,8 +329,10 @@ else # Diff-only.
329
-p1 \
330
-style="$style" \
331
-iregex="$exclusions_regex"'.*\.(c|cpp|cxx|cc|h|hpp|m|mm|js|java)' \
332
- > "$patch_dest" \
333
- || exit 1
+ > "$patch_dest"
+ # Starting with version 18, clang-format-diff exits with status 1 when there
334
+ # are diffs, but other non-zero statuses indicate errors.
335
+ [ $? -gt 1 ] && exit $?
336
337
if [ "$apply_to_staged" = true ]; then
338
if [ ! -s "$patch_dest" ]; then
0 commit comments