OSDN Git Service

t9902: fix 'test A == B' to use = operator
authorThomas Rast <trast@inf.ethz.ch>
Mon, 8 Jul 2013 15:20:31 +0000 (17:20 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Jul 2013 17:20:59 +0000 (10:20 -0700)
The == operator as an alias to = is not POSIX.  This doesn't actually
matter for the execution of the script, because it only runs when the
shell is bash.  However, it trips up test-lint, so it's nicer to use
the standard form.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9902-completion.sh

index 6d9d141..a71d8b4 100755 (executable)
@@ -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
 }