Merge pull request #1143 from eedwards-sk/GH-1142

GH-1142 add behavior to address using set -e
pull/1281/head^2
Travis Swicegood 2018-12-02 21:14:26 -06:00 committed by GitHub
commit 97df5c4540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -139,9 +139,9 @@ function scm_prompt_info_common {
fi
# TODO: consider adding minimal status information for hg and svn
[[ ${SCM} == ${SCM_P4} ]] && p4_prompt_info && return
[[ ${SCM} == ${SCM_HG} ]] && hg_prompt_info && return
[[ ${SCM} == ${SCM_SVN} ]] && svn_prompt_info && return
{ [[ ${SCM} == ${SCM_P4} ]] && p4_prompt_info && return; } || true
{ [[ ${SCM} == ${SCM_HG} ]] && hg_prompt_info && return; } || true
{ [[ ${SCM} == ${SCM_SVN} ]] && svn_prompt_info && return; } || true
}
function git_prompt_minimal_info {

View File

@ -72,7 +72,7 @@ function _git-hide-status {
function _git-status {
local git_status_flags=
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && git_status_flags='-uno'
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && git_status_flags='-uno' || true
git status --porcelain ${git_status_flags} 2> /dev/null
}
@ -101,8 +101,9 @@ function _git-status-counts {
}
function _git-remote-info {
[[ "$(_git-upstream)" == "" ]] && return
[[ "$(_git-upstream)" == "" ]] && return || true
[[ "$(_git-branch)" == "$(_git-upstream-branch)" ]] && local same_branch_name=true || true
local same_branch_name=
[[ "$(_git-branch)" == "$(_git-upstream-branch)" ]] && same_branch_name=true
if ([[ "${SCM_GIT_SHOW_REMOTE_INFO}" = "auto" ]] && [[ "$(_git-num-remotes)" -ge 2 ]]) ||