{"thread":{"id":"17359","subject":"[PATCH] Mention \"local convention\" rule in the CodingGuidelines","startedAt":"2009-01-25T21:15:48Z","lastAt":"2009-01-25T21:15:48Z","messageCount":1,"participants":["Nanako Shiraishi"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"101880","messageId":"20090126061548.6117@nanako3.lavabit.com","threadId":"17359","inReplyTo":null,"subject":"[PATCH] Mention \"local convention\" rule in the CodingGuidelines","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-01-25T21:15:48Z","receivedAt":"2009-01-25T21:15:48Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"The document suggests to imitate the existing code, but didn't\nsay which existing code it should imitate. This clarifies.\n\nSigned-off-by: しらいしななこ <nanako3@lavabit.com>\n---\nQuoting Junio C Hamano <gitster@pobox.com>:\n\n> It is always preferable to match the _local_ convention.  I'd expect a new\n> script added to git suite to match my preference (the one I showed you in\n> my comments to you that is used in git-am, which is what you suggested\n> above), but I'd expect a modification to mergetool to match the style\n> mergetool already uses.\n\n Documentation/CodingGuidelines |    9 +++++++--\n 1 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\nindex f628c1f..664c6c2 100644\n--- a/Documentation/CodingGuidelines\n+++ b/Documentation/CodingGuidelines\n@@ -21,8 +21,13 @@ code.  For git in general, three rough rules are:\n \n As for more concrete guidelines, just imitate the existing code\n (this is a good guideline, no matter which project you are\n-contributing to).  But if you must have a list of rules,\n-here they are.\n+contributing to). It is always preferable to match the _local_\n+convention. A new code added to git suite is expected to match\n+the overall style of existing code. A modification to an existing\n+code is expected to match the style the surrounding code already\n+uses (even if it doesn't match the overall style of existing code).\n+\n+But if you must have a list of rules, here they are.\n \n For shell scripts specifically (not exhaustive):\n \n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"}]}