mirror of
https://github.com/git/git.git
synced 2024-05-13 09:56:09 +02:00
Merge branch 'vs/complete-with-set-u-fix'
Another "set -u" fix for the bash prompt (in contrib/) script. * vs/complete-with-set-u-fix: completion: protect prompt against unset SHOWUPSTREAM in nounset mode completion: fix prompt with unset SHOWCONFLICTSTATE in nounset mode
This commit is contained in:
commit
a4a1453ad1
|
@ -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 ;;
|
||||
|
@ -528,7 +528,7 @@ __git_ps1 ()
|
|||
fi
|
||||
|
||||
local conflict="" # state indicator for unresolved conflicts
|
||||
if [[ "${GIT_PS1_SHOWCONFLICTSTATE}" == "yes" ]] &&
|
||||
if [[ "${GIT_PS1_SHOWCONFLICTSTATE-}" == "yes" ]] &&
|
||||
[[ $(git ls-files --unmerged 2>/dev/null) ]]; then
|
||||
conflict="|CONFLICT"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue