Code

merge-octopus: Work around environment issue on Windows
[git.git] / Documentation / CodingGuidelines
index 0d7fa9cca9e5c3ec8a11cd2c878f5a7afe353abe..8346c1972be24abf4e4269b9171a0eb456c2895a 100644 (file)
@@ -43,6 +43,10 @@ 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).
+
  - No "Substring Expansion" ${parameter:offset:length}.
 
  - No shell arrays.
@@ -129,3 +133,6 @@ For C programs:
    used in the git core command set (unless your command is clearly
    separate from it, such as an importer to convert random-scm-X
    repositories to git).
+
+ - When we pass <string, length> pair to functions, we should try to
+   pass them in that order.