From: Justin Tobler Date: Sat, 27 Sep 2025 14:50:45 +0000 (-0500) Subject: clang-format: exclude control macros from SpaceBeforeParens X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3721541d35a0112e143c74e11a23cd329600f40e;p=thirdparty%2Fgit.git clang-format: exclude control macros from SpaceBeforeParens The formatter currently suggests adding a space between a control macro and parentheses. In the Git project, this is not typically expected. Set `SpaceBeforeParens` to `ControlStatementsExceptControlMacros` accordingly. Helped-by: Karthik Nayak Signed-off-by: Justin Tobler Signed-off-by: Junio C Hamano --- diff --git a/.clang-format b/.clang-format index dcfd0aad60..86b4fe33e5 100644 --- a/.clang-format +++ b/.clang-format @@ -149,7 +149,7 @@ SpaceBeforeCaseColon: false # f(); # } # } -SpaceBeforeParens: ControlStatements +SpaceBeforeParens: ControlStatementsExceptControlMacros # Don't insert spaces inside empty '()' SpaceInEmptyParentheses: false