Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Bash prompt doesn't work with set -u #2799

Closed
1 task done
AnyOldName3 opened this issue Aug 27, 2020 · 0 comments · Fixed by #2800
Closed
1 task done

Git Bash prompt doesn't work with set -u #2799

AnyOldName3 opened this issue Aug 27, 2020 · 0 comments · Fixed by #2800

Comments

@AnyOldName3
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.28.0.windows.1
cpu: x86_64
built from commit: 77982caf269b7ee713a76da2bcf260c34d3bf7a7
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.18363.1016]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Notepad++
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Nope.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Git Bash

set -u
# the prompt will no longer display git information (e.g. the current branch), and after each command `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` will be printed
  • What did you expect to occur after running these commands?

If I (or a script I ran) referred to unbound variables, an error message would be printed, but the git prompt would keep working and not reference unbound variables.

  • What actually happened instead?
bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable

gets printed after each command

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

N/A

More details, unconstrained by the issue report form

This only appeared with a recent update, so I had a look over the history, and determined that this commit is responsible: afda36d

AnyOldName3 added a commit to AnyOldName3/git that referenced this issue Aug 27, 2020
AnyOldName3 added a commit to AnyOldName3/git that referenced this issue Aug 27, 2020
Resolves git-for-windows#2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
AnyOldName3 added a commit to AnyOldName3/git that referenced this issue Aug 27, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes git-for-windows#2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
dscho pushed a commit that referenced this issue Oct 8, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
dscho pushed a commit that referenced this issue Oct 8, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
dscho pushed a commit that referenced this issue Oct 8, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
dscho pushed a commit that referenced this issue Oct 8, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
git-for-windows-ci pushed a commit that referenced this issue Oct 8, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
git-for-windows-ci pushed a commit that referenced this issue Oct 8, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
git-for-windows-ci pushed a commit that referenced this issue Oct 8, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
git-for-windows-ci pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
git-for-windows-ci pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
dscho pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
dscho pushed a commit to dscho/git that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes git-for-windows#2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
dscho pushed a commit to dscho/git that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes git-for-windows#2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
dscho pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue Oct 9, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 12, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 12, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 13, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 15, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 15, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 15, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 15, 2020
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 4, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 4, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 4, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 5, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 5, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 6, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 6, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 6, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 10, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 10, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 10, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 11, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 11, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 11, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 12, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 12, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 12, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 13, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 13, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 13, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 13, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 13, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 14, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 14, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 17, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit to dscho/git that referenced this issue May 17, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes git-for-windows#2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 17, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue May 17, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 19, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho pushed a commit that referenced this issue May 22, 2021
After `set -u` in Bash, the Git prompt would not be displayed and the
error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be
printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default
when it gets used.

This change sets a default value of an empty string to use when the
variable is unset to explicitly make the behaviour consistent between
`set -u` and `set +u`.

This fixes #2799

Signed-off-by: Chris Djali <krizdjali+github@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant