aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-09-18 10:07:01 -0700
committerJunio C Hamano <gitster@pobox.com>2025-09-18 10:07:01 -0700
commitc6fa656e2ce6b31e0f92c9d54b706d3d28866c52 (patch)
treebcb180e321c4eca2438de38105ec3662d085bced /Documentation
parentd29cbbbf367dea4015dda1b146615fcec2ea3782 (diff)
parent929b1d08f790938e147301a61c2dee4253cc3fa5 (diff)
downloadgit-c6fa656e2ce6b31e0f92c9d54b706d3d28866c52.tar.gz
Merge branch 'kn/clang-format-bitfields'
CodingGuidelines now spells out how bitfields are to be written. * kn/clang-format-bitfields: Documentation: note styling for bit fields
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/CodingGuidelines6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 224f0978a8..df72fe0177 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -650,6 +650,12 @@ For C programs:
cases. However, it is recommended to find a more descriptive name wherever
possible to improve the readability and maintainability of the code.
+ - Bit fields should be defined without a space around the colon. E.g.
+
+ unsigned my_field:1;
+ unsigned other_field:1;
+ unsigned field_with_longer_name:1;
+
For Perl programs:
- Most of the C guidelines above apply.