From: Felipe Contreras Date: Wed, 28 Oct 2020 02:07:09 +0000 (-0600) Subject: completion: bash: trivial cleanup X-Git-Tag: v2.30.0-rc0~105^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a364d2a18311de1791375731678ca13cde89f13;p=thirdparty%2Fgit.git completion: bash: trivial cleanup There's no need to set a variable we are not going to use. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 26d6ee20b0..ed059f35c3 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -416,14 +416,13 @@ __gitcomp_builtin () local options eval "options=\${$var-}" - local completion_helper - if [ "$GIT_COMPLETION_SHOW_ALL" = "1" ]; then - completion_helper="--git-completion-helper-all" - else - completion_helper="--git-completion-helper" - fi - if [ -z "$options" ]; then + local completion_helper + if [ "$GIT_COMPLETION_SHOW_ALL" = "1" ]; then + completion_helper="--git-completion-helper-all" + else + completion_helper="--git-completion-helper" + fi # leading and trailing spaces are significant to make # option removal work correctly. options=" $incl $(__git ${cmd/_/ } $completion_helper) " || return