1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-13 11:06:31 +02:00

test-lint: detect 'export FOO=bar'

Some shells do not understand the one-line construct, and instead need

  FOO=bar &&
  export FOO

Detect this in the test-lint target.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Thomas Rast 2013-07-08 17:20:32 +02:00 committed by Junio C Hamano
parent 38678a15a2
commit 9968ffff0d

View File

@ -21,6 +21,7 @@ sub err {
/^\s*declare\s+/ and err 'arrays/declare not portable';
/^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
/test\s+[^=]*==/ and err '"test a == b" is not portable (please use =)';
/^\s*export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';
# this resets our $. for each file
close ARGV if eof;
}