Skip to content

Commit 5a364d2

Browse files
felipecgitster
authored andcommitted
completion: bash: trivial cleanup
There's no need to set a variable we are not going to use. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 35a4170 commit 5a364d2

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

contrib/completion/git-completion.bash

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,13 @@ __gitcomp_builtin ()
416416
local options
417417
eval "options=\${$var-}"
418418

419-
local completion_helper
420-
if [ "$GIT_COMPLETION_SHOW_ALL" = "1" ]; then
421-
completion_helper="--git-completion-helper-all"
422-
else
423-
completion_helper="--git-completion-helper"
424-
fi
425-
426419
if [ -z "$options" ]; then
420+
local completion_helper
421+
if [ "$GIT_COMPLETION_SHOW_ALL" = "1" ]; then
422+
completion_helper="--git-completion-helper-all"
423+
else
424+
completion_helper="--git-completion-helper"
425+
fi
427426
# leading and trailing spaces are significant to make
428427
# option removal work correctly.
429428
options=" $incl $(__git ${cmd/_/ } $completion_helper) " || return

0 commit comments

Comments
 (0)