]> git.ipfire.org Git - thirdparty/git.git/commit
completion: avoid aliased command lookup error in nounset mode
authorVille Skyttä <ville.skytta@iki.fi>
Fri, 16 Apr 2021 19:19:39 +0000 (22:19 +0300)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Apr 2021 20:40:52 +0000 (13:40 -0700)
commit76655e8a28d35c7243fa8f138c90a123aa32357f
tree0c1f6d2b7c13c5195ec4bc8728656e4c1394105c
parentc5c0548d793edf4a6e319f237f3a01a1f093bbd7
completion: avoid aliased command lookup error in nounset mode

Aliased command lookup accesses the `list` variable before it has been
set, causing an error in "nounset" mode. Initialize to an empty string
to avoid that.

    $ git nonexistent-command <Tab>bash: list: unbound variable

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash