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 modemaint
commit
a4a1453ad1
|
@ -141,7 +141,7 @@ __git_ps1_show_upstream ()
|
||||||
|
|
||||||
# parse configuration values
|
# parse configuration values
|
||||||
local option
|
local option
|
||||||
for option in ${GIT_PS1_SHOWUPSTREAM}; do
|
for option in ${GIT_PS1_SHOWUPSTREAM-}; do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
git|svn) upstream_type="$option" ;;
|
git|svn) upstream_type="$option" ;;
|
||||||
verbose) verbose=1 ;;
|
verbose) verbose=1 ;;
|
||||||
|
@ -528,7 +528,7 @@ __git_ps1 ()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local conflict="" # state indicator for unresolved conflicts
|
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
|
[[ $(git ls-files --unmerged 2>/dev/null) ]]; then
|
||||||
conflict="|CONFLICT"
|
conflict="|CONFLICT"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue