completion: fix prompt with unset SHOWCONFLICTSTATE in nounset mode
commit758b4e137349b8548ada07346ab82e82079b43a3
authorVille Skyttä <ville.skytta@iki.fi>
Mon, 1 Apr 2024 11:30:33 +0000 (1 11:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Apr 2024 15:31:54 +0000 (1 08:31 -0700)
tree11d2efcc00d3bd961f04a9fb14c6fe19b8365236
parent3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0
completion: fix prompt with unset SHOWCONFLICTSTATE in nounset mode

`GIT_PS1_SHOWCONFLICTSTATE` is a user variable that might not be set,
causing errors when the shell is in `nounset` mode.

Take into account on access by falling back to an empty string.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-prompt.sh