summaryrefslogtreecommitdiff
path: root/Documentation/CodingGuidelines
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-05-23 01:26:09 +0200
committerJunio C Hamano <gitster@pobox.com>2008-05-24 22:13:19 -0700
commit0b0b8cd7c2c3df72fc3959805b035e55e1bb1270 (patch)
tree53b0ff3aba768c36a6c7ad91d25e77a49547e7e5 /Documentation/CodingGuidelines
parent633f43e1f774337ce1d8b8cf01c5bbe82b086ef6 (diff)
downloadgit-0b0b8cd7c2c3df72fc3959805b035e55e1bb1270.tar.gz
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