]> git.ipfire.org Git - thirdparty/git.git/commit - contrib/completion/git-completion.bash
completion: use "prev" variable instead of introducing "prevword"
authorÁkos Uzonyi <uzonyi.akos@gmail.com>
Fri, 25 Sep 2020 21:11:23 +0000 (23:11 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 26 Sep 2020 22:30:03 +0000 (15:30 -0700)
commitc09d1280f7787020e28844e8fd615d973d2a811e
treed2fa7c37770682522a491790b9335ad382cc39e6
parent9bc233ae1cf19a49e51842c7959d80a675dbd1c0
completion: use "prev" variable instead of introducing "prevword"

In both _git_checkout and _git_switch a new "prevword" variable were
introduced, however the "prev" variable already contains the last word.

The "prevword" variable is replaced with "prev", and the case is moved
to the beginning of the function, like it's done in many other places
(e.g. _git_commit). Also the indentaion of the case is fixed.

Signed-off-by: Ákos Uzonyi <uzonyi.akos@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash