diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-08 14:25:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-08 14:25:07 -0700 |
commit | 6d4bf5813cd2c1a3b93fd4f0b231733f82133cce (patch) | |
tree | c6a42769e8a2b0a3af91e89d4934c5ce0b94b458 /Documentation/CodingGuidelines | |
parent | Merge branch 'ds/sparse-allow-empty-working-tree' (diff) | |
parent | CodingGuidelines: drop arithmetic expansion advice to use "$x" (diff) | |
download | tgif-6d4bf5813cd2c1a3b93fd4f0b231733f82133cce.tar.xz |
Merge branch 'jk/arith-expansion-coding-guidelines'
The coding guideline for shell scripts instructed to refer to a
variable with dollar-sign inside arithmetic expansion to work
around a bug in old versions of dash, which is a thing of the past.
Now we are not forbidden from writing $((var+1)).
* jk/arith-expansion-coding-guidelines:
CodingGuidelines: drop arithmetic expansion advice to use "$x"
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r-- | Documentation/CodingGuidelines | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 390ceece52..a89e8dcfbc 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -95,10 +95,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. |