]> git.ipfire.org Git - thirdparty/git.git/commit
completion: protect prompt against unset SHOWUPSTREAM in nounset mode
authorVille Skyttä <ville.skytta@iki.fi>
Mon, 1 Apr 2024 19:07:51 +0000 (19:07 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Apr 2024 19:38:23 +0000 (12:38 -0700)
commitd7805bc74351e61126e587a7470e3fbf843caf8a
tree559b09ba04a9786ab121c63392e5dde9da29c878
parent758b4e137349b8548ada07346ab82e82079b43a3
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>
contrib/completion/git-prompt.sh