Skip to content

Commit

Permalink
Mention "local convention" rule in the CodingGuidelines
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nanako Shiraishi authored and Junio C Hamano committed Jan 26, 2009
1 parent afc7274 commit dfb047b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Documentation/CodingGuidelines
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down

0 comments on commit dfb047b

Please sign in to comment.