mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
omb-prompt-base: do not attempt to process git vars outside a git tree (#443)
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com> Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
This commit is contained in:
@@ -237,6 +237,7 @@ function git_status_summary {
|
||||
function git_prompt_vars {
|
||||
local details=''
|
||||
local git_status_flags=''
|
||||
[[ "$(command git rev-parse --is-inside-work-tree 2> /dev/null)" == "true" ]] || return 1
|
||||
SCM_STATE=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
|
||||
if [[ "$(command git config --get bash-it.hide-status)" != "1" ]]; then
|
||||
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && git_status_flags='-uno'
|
||||
|
Reference in New Issue
Block a user