Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
CodingGuidelines: give an example for case/esac statement
author
Junio C Hamano
<gitster@pobox.com>
Wed, 30 Apr 2014 21:24:08 +0000
(14:24 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 2 May 2014 20:24:57 +0000
(13:24 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/CodingGuidelines
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
dd30800
)
diff --git
a/Documentation/CodingGuidelines
b/Documentation/CodingGuidelines
index c405b0b9dff81fa00c5aa03ba6cb2222dceac9f8..169b4358c93a8406a7fff10de3529e95cf6b7018 100644
(file)
--- a/
Documentation/CodingGuidelines
+++ b/
Documentation/CodingGuidelines
@@
-42,7
+42,17
@@
For shell scripts specifically (not exhaustive):
- We use tabs for indentation.
- - Case arms are indented at the same depth as case and esac lines.
+ - Case arms are indented at the same depth as case and esac lines,
+ like this:
+
+ case "$variable" in
+ pattern1)
+ do this
+ ;;
+ pattern2)
+ do that
+ ;;
+ esac
- Redirection operators should be written with space before, but no
space after them. In other words, write 'echo test >"$file"'