mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
Merge branch 'tr/test-lint-no-export-assignment-in-shell' into maint
* tr/test-lint-no-export-assignment-in-shell: test-lint: detect 'export FOO=bar' t9902: fix 'test A == B' to use = operator
This commit is contained in:
commit
98aa2eabf0
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ run_completion ()
|
|||
local -a COMPREPLY _words
|
||||
local _cword
|
||||
_words=( $1 )
|
||||
test "${1: -1}" == ' ' && _words+=('')
|
||||
test "${1: -1}" = ' ' && _words+=('')
|
||||
(( _cword = ${#_words[@]} - 1 ))
|
||||
__git_wrap__git_main && print_comp
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue