Skip to content

Commit a84fd3b

Browse files
committed
CodingGuidelines: explicitly allow "local" for test scripts
01d3a52 (t0000: check whether the shell supports the "local" keyword, 2017-10-26) raised a test balloon to see if those who build and test Git use a platform with a shell that lacks support for the "local" keyword. After two years, 7f0b590 (t0000: reword comments for "local" test, 2019-08-08) documented that "local" keyword, even though is outside POSIX, is allowed in our test scripts. Let's write it in the CodingGuidelines, too. It might be tempting to allow it in scripted Porcelains (we have avoided getting them contaminiated by "local" so far), but they are on their way out and getting rewritten in C. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 48bf2fa commit a84fd3b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Documentation/CodingGuidelines

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ For shell scripts specifically (not exhaustive):
175175

176176
does not have such a problem.
177177

178+
- Even though "local" is not part of POSIX, we make heavy use of it
179+
in our test suite. We do not use it in scripted Porcelains, and
180+
hopefully nobody starts using "local" before they are reimplemented
181+
in C ;-)
182+
178183

179184
For C programs:
180185

0 commit comments

Comments
 (0)