mirror of
https://github.com/git/git.git
synced 2024-10-28 04:49:43 +01:00
completion: protect prompt against unset SHOWUPSTREAM in nounset mode
As it stands, the only call site of `__git_ps1_show_upstream` checks that the `GIT_PS1_SHOWUPSTREAM` variable is set, so this is effectively a no-op. However, that might change, and chances of noticing the unprotected use might not be that high when it does. Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
758b4e1373
commit
d7805bc743
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ __git_ps1_show_upstream ()
|
|||
|
||||
# parse configuration values
|
||||
local option
|
||||
for option in ${GIT_PS1_SHOWUPSTREAM}; do
|
||||
for option in ${GIT_PS1_SHOWUPSTREAM-}; do
|
||||
case "$option" in
|
||||
git|svn) upstream_type="$option" ;;
|
||||
verbose) verbose=1 ;;
|
||||
|
|
Loading…
Reference in a new issue