diff options
| author | Junio C Hamano <gitster@pobox.com> | 2012-08-24 12:34:19 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2012-08-24 12:34:19 -0700 |
| commit | 871e293c9acbeaacce59dcd98fab6028f552f5be (patch) | |
| tree | c363ffb2dcced8d6e8057e31c5d7378508205c50 /Documentation/CodingGuidelines | |
| parent | fab4b04e4be5ccfdf93e21e7260040bd9e7faedd (diff) | |
| parent | b52183179bb0a97ea4d91d1248aca303d8e8f892 (diff) | |
| download | git-871e293c9acbeaacce59dcd98fab6028f552f5be.tar.xz | |
Merge branch 'maint-1.7.11' into maint
* maint-1.7.11:
Prepare for 1.7.11.6
Make the ciabot scripts completely self-configuring in the normal case.
Improved documentation for the ciabot scripts.
man: git pull -r is a short for --rebase
gitcli: describe abbreviation of long options
rev-list docs: clarify --topo-order description
Documentation/CodingGuidelines: spell out more shell guidelines
Documentation: do not mention .git/refs/* directories
tests: Introduce test_seq
Diffstat (limited to 'Documentation/CodingGuidelines')
| -rw-r--r-- | Documentation/CodingGuidelines | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 45577117c2..57da6aadeb 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -76,11 +76,19 @@ For shell scripts specifically (not exhaustive): - We do not use Process Substitution <(list) or >(list). + - Do not write control structures on a single line with semicolon. + "then" should be on the next line for if statements, and "do" + should be on the next line for "while" and "for". + - We prefer "test" over "[ ... ]". - We do not write the noiseword "function" in front of shell functions. + - We prefer a space between the function name and the parentheses. The + opening "{" should also be on the same line. + E.g.: my_function () { + - As to use of grep, stick to a subset of BRE (namely, no \{m,n\}, [::], [==], nor [..]) for portability. |
