Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore exit code of clang-format-diff #35

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ptomato
Copy link
Contributor

@ptomato ptomato commented Jul 28, 2024

Adapt to breaking change in clang-format-diff 18.x. The PR also includes a few unrelated cleanups.

Closes: #33

ptomato added 4 commits July 28, 2024 11:36
This helps debug what is happening when a git command fails in a test.
Newer versions of git don't allow this by default. Specify the
appropriate config option on the command line to allow it.
Starting with 18.x, clang-format-diff exits with a nonzero exit code if
there was a diff to be applied. This breaks the apply-format script
because it will exit without printing the diff. Instead, ignore the exit
code and proceed to print the diff.

Closes: barisione#33
@ptomato
Copy link
Contributor Author

ptomato commented Jul 28, 2024

Note, clang-format-diff 18.x has another regression: llvm/llvm-project#86776 This causes the test_two_files tests to fail, but it is unrelated to this change. Hopefully they will backport the fix soon.

otaviolima

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New clang-format-diff returns a non-zero status code when diffs exist leading apply-format to fail
2 participants