summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-10-28 02:07:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-28 21:30:59 (GMT)
commit5a364d2a18311de1791375731678ca13cde89f13 (patch)
tree3e2733c4da64b5b4c265e73b5360ecb7f33e1853 /contrib/completion/git-completion.bash
parent35a4170d8656b27d08458c3c381dd163199da4f3 (diff)
downloadgit-5a364d2a18311de1791375731678ca13cde89f13.zip
git-5a364d2a18311de1791375731678ca13cde89f13.tar.gz
git-5a364d2a18311de1791375731678ca13cde89f13.tar.bz2
completion: bash: trivial cleanup
There's no need to set a variable we are not going to use. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash13
1 files changed, 6 insertions, 7 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 26d6ee2..ed059f3 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