mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00: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:
parent
38678a15a2
commit
9968ffff0d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue