aboutsummaryrefslogtreecommitdiff
path: root/Documentation/CodingGuidelines
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-02-25 11:54:17 -0800
committerJunio C Hamano <gitster@pobox.com>2026-02-25 11:54:17 -0800
commit1a46f31b3e1a0f739cb1b045861ba56bc126c6ee (patch)
treee4e1871b39a8c585e3483a607573ca8db486e871 /Documentation/CodingGuidelines
parent8d15dd1ce10f8d066ed058917f3183ec3efd7f95 (diff)
parentaa94ba7d80c3b917a507f6975bd6400436fcd9e6 (diff)
downloadgit-1a46f31b3e1a0f739cb1b045861ba56bc126c6ee.tar.xz
Merge branch 'jc/doc-cg-needswork'
A CodingGuidelines update. * jc/doc-cg-needswork: CodingGuidelines: document NEEDSWORK comments
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r--Documentation/CodingGuidelines10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 51cb70b515..bec200428f 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -33,6 +33,16 @@ Git in general, a few rough rules are:
achieve and why the changes were necessary (more on this in the
accompanying SubmittingPatches document).
+ - A label "NEEDSWORK:" followed by a description of the things to
+ be done is a way to leave in-code comments to document design
+ decisions yet to be made. 80% of the work to resolve a NEEDSWORK
+ comment is to decide if it still makes sense to do so, since the
+ situation around the codebase may have changed since the comment
+ was written. It can be a very valid change to remove an existing
+ NEEDSWORK comment without doing anything else, with the commit log
+ message describing a good argument why it does not make sense to do
+ the thing the NEEDSWORK comment mentioned.
+
Make your code readable and sensible, and don't try to be clever.
As for more concrete guidelines, just imitate the existing code