]> git.ipfire.org Git - thirdparty/git.git/commit
clang-format: fix indentation width for preprocessor directives
authorPatrick Steinhardt <ps@pks.im>
Tue, 30 Jul 2024 07:24:33 +0000 (09:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Jul 2024 20:50:25 +0000 (13:50 -0700)
commit395726717bcc4073d2adba4ee5016a350dfa8d3a
treed60342efc65d880817100c3dcac0246df2438fde
parentb4e8a8c16354ce2fe47aef6be524af95d3321617
clang-format: fix indentation width for preprocessor directives

In [1], we have improved our clang-format configuration to also specify
the style for how to indent preprocessor directives. But while we have
settled the question of where to put the indentation, either before or
after the hash sign, we didn't specify exactly how to indent.

With the current configuration, clang-format uses tabs to indent each
level of nested preprocessor directives, which is in fact unintentional
and never done in our codebase. Instead, we use a mixture of indenting
by either one or two spaces, where using a single space is somewhat more
common.

Adapt our clang-format configuration accordingly by specifying an
indentation width of one space.

[1]: <20240708092317.267915-1-karthik.188@gmail.com>

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.clang-format