Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-05-23 03:26:09 +0400
committerJunio C Hamano <gitster@pobox.com>2008-05-25 09:13:19 +0400
commit0b0b8cd7c2c3df72fc3959805b035e55e1bb1270 (patch)
tree53b0ff3aba768c36a6c7ad91d25e77a49547e7e5 /Documentation/CodingGuidelines
parent633f43e1f774337ce1d8b8cf01c5bbe82b086ef6 (diff)
CodingGuidelines: Add a note to avoid assignments inside if()
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r--Documentation/CodingGuidelines2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 994eb9159a..d2a0a76e6c 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -89,6 +89,8 @@ For C programs:
of "else if" statements, it can make sense to add braces to
single line blocks.
+ - We try to avoid assignments inside if().
+
- Try to make your code understandable. You may put comments
in, but comments invariably tend to stale out when the code
they were describing changes. Often splitting a function