# Re: git-sh-prompt: bash: GIT\_PS1\_COMPRESSSPARSESTATE: unbound variable

- From: Junio C Hamano \<hidden\>
- Date: 2021-05-19 23:29:15 
- List: git
- Page: https://ratatoskr.run/git/2021/05/7888570
- Thread: https://ratatoskr.run/git/2021/05/7888570/t.md

```text
Christoph Anton Mitterer [ref] writes:

> Hey there.
>
> I think I found another case of an unbound variable:
>
> Completing e.g.:
> git commit --[press TAB]
>
> gives:
> $ git commit  --bash: GIT_COMPLETION_SHOW_ALL: unbound variable

It seems that OMIT_SPARSESTATE would have the same issue.

	if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
	   [ -z "${GIT_PS1_OMITSPARSESTATE}" ] &&

all coming from afda36db (git-prompt: include sparsity state as
well, 2020-06-21).

But I think we have already seen the fix in 5c0cbdb1 (git-prompt:
work under set -u, 2021-05-13), which may or may not appear in the
upcoming release.

There still are unprotected mentions of GIT_PS1_SHOWUPSTREAM even
with that fix, though.
```
