path: root/Documentation/CodingGuidelines
diff options
authorJeff King <>2020-05-04 16:07:09 (GMT)
committerJunio C Hamano <>2020-05-04 19:36:07 (GMT)
commit32b5fe7f0e2cb798954b3e01b990bc140706e191 (patch)
tree06c0ebef87bc79382d80234f072f9e58814f2c43 /Documentation/CodingGuidelines
parentaf6b65d45ef179ed52087e80cb089f6b2349f4ec (diff)
CodingGuidelines: drop arithmetic expansion advice to use "$x"
The advice to use "$x" rather than "x" in arithmetric expansion was working around a dash bug fixed in 0.5.4. Even Debian oldstable has 0.5.8 these days. And in the meantime, we've added almost two dozen instances of the "x" form which you can find with: git grep '$(([a-z]' and nobody seems to have complained. Let's declare this workaround obsolete and simplify our style guide. Helped-by: Danh Doan <> Signed-off-by: Jeff King <> Reviewed-by: Carlo Marcelo Arenas Belón <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/CodingGuidelines')
1 files changed, 0 insertions, 4 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index ed4e443..6fc85ca 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -97,10 +97,6 @@ For shell scripts specifically (not exhaustive):
- We use Arithmetic Expansion $(( ... )).
- - Inside Arithmetic Expansion, spell shell variables with $ in front
- of them, as some shells do not grok $((x)) while accepting $(($x))
- just fine (e.g. dash older than 0.5.4).
- We do not use Process Substitution <(list) or >(list).
- Do not write control structures on a single line with semicolon.