summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c149184)
raw | patch | inline | side by side (parent: c149184)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 2 Mar 2008 02:18:16 +0000 (18:18 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 2 Mar 2008 02:18:16 +0000 (18:18 -0800) |
Our scripts try to stick to fairly limited subset of POSIX BRE for
portability. It is unclear from manual page from GNU grep which is GNU
extension and which is portable, so let's spell it out to help new people
to keep their contributions from hurting porters.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
portability. It is unclear from manual page from GNU grep which is GNU
extension and which is portable, so let's spell it out to help new people
to keep their contributions from hurting porters.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/CodingGuidelines | patch | blob | history |
index 3b042db624980dc962bbd67af1f3defa82ea64b1..994eb9159a2b0e8a10f4f9510165d420004203bf 100644 (file)
- 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