From: Nanako Shiraishi Date: Mon, 26 Jan 2009 08:32:22 +0000 (+0900) Subject: Mention "local convention" rule in the CodingGuidelines X-Git-Tag: v1.6.2-rc0~84 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dfb047b9e4f7f66c5322ef642f21fd92b0a975e3;p=git.git 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: しらいしななこ Signed-off-by: Junio C Hamano --- diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index f628c1f3b..0d7fa9cca 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -21,8 +21,13 @@ code. For git in general, three rough rules are: As for more concrete guidelines, just imitate the existing code (this is a good guideline, no matter which project you are -contributing to). But if you must have a list of rules, -here they are. +contributing to). It is always preferable to match the _local_ +convention. New code added to git suite is expected to match +the overall style of existing code. Modifications to existing +code is expected to match the style the surrounding code already +uses (even if it doesn't match the overall style of existing code). + +But if you must have a list of rules, here they are. For shell scripts specifically (not exhaustive):