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: しらいしななこ <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nanako Shiraishi committed
Jan 26, 2009 at 17:32 UTC
dfb047b9e4f7f66c5322ef642f21fd92b0a975e3
1 file changed
+7
-2
Documentation/CodingGuidelines
+7
-2
@@ -21,8 +21,13 @@ code. For git in general, three rough rules are:
21
22
As for more concrete guidelines, just imitate the existing code
23
(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.
31
32
For shell scripts specifically (not exhaustive):
33