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.
1 parent ac35e70 commit b7d9251Copy full SHA for b7d9251
apply-format
@@ -325,8 +325,10 @@ else # Diff-only.
325
-p1 \
326
-style="$style" \
327
-iregex="$exclusions_regex"'.*\.(c|cpp|cxx|cc|h|hpp|m|mm|js|java)' \
328
- > "$patch_dest" \
329
- || exit 1
+ > "$patch_dest"
+ # Starting with version 18, clang-format-diff exits with status 1 when there
330
+ # are diffs, but other non-zero statuses indicate errors.
331
+ [ $? -gt 1 ] && exit $?
332
333
if [ "$apply_to_staged" = true ]; then
334
if [ ! -s "$patch_dest" ]; then
0 commit comments