Skip to content

Commit dfb047b

Browse files
Nanako Shiraishigitster
authored andcommitted
Mention "local convention" rule in the CodingGuidelines
The document suggests to imitate the existing code, but didn't say which existing code it should imitate. This clarifies. Signed-off-by: しらいしななこ <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent afc7274 commit dfb047b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Documentation/CodingGuidelines

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ code. For git in general, three rough rules are:
2121

2222
As for more concrete guidelines, just imitate the existing code
2323
(this is a good guideline, no matter which project you are
24-
contributing to). But if you must have a list of rules,
25-
here they are.
24+
contributing to). It is always preferable to match the _local_
25+
convention. New code added to git suite is expected to match
26+
the overall style of existing code. Modifications to existing
27+
code is expected to match the style the surrounding code already
28+
uses (even if it doesn't match the overall style of existing code).
29+
30+
But if you must have a list of rules, here they are.
2631

2732
For shell scripts specifically (not exhaustive):
2833

0 commit comments

Comments
 (0)