X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2FCodingGuidelines;h=994eb9159a2b0e8a10f4f9510165d420004203bf;hb=9d880582ee0e63b3865350e90d3576fec55aed20;hp=3b042db624980dc962bbd67af1f3defa82ea64b1;hpb=41e2edf41a6d501f1b8beca7f1f0bcbe9296dcc2;p=git.git diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 3b042db62..994eb9159 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -53,6 +53,18 @@ For shell scripts specifically (not exhaustive): - We do not write the noiseword "function" in front of shell functions. + - As to use of grep, stick to a subset of BRE (namely, no \{m,n\}, + [::], [==], nor [..]) for portability. + + - We do not use \{m,n\}; + + - We do not use -E; + + - We do not use ? nor + (which are \{0,1\} and \{1,\} + respectively in BRE) but that goes without saying as these + are ERE elements not BRE (note that \? and \+ are not even part + of BRE -- making them accessible from BRE is a GNU extension). + For C programs: - We use tabs to indent, and interpret tabs as taking up to