Skip to content

Commit

Permalink
fix(git where): clear when moving out of a git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Apr 21, 2020
1 parent e9af5d5 commit b5c0f6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions porcelain-prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function if_porcelain_prompt_not_zero() {
function gitstatus_prompt_update() {
emulate -L zsh
typeset -g _PORCELAIN_PROMPT_GIT_STATUS=
typeset -g _PORCELAIN_PROMPT_GIT_WHERE=

# Call gitstatus_query synchronously. Note that gitstatus_query can also be called
# asynchronously; see documentation in gitstatus.plugin.zsh.
Expand Down Expand Up @@ -240,8 +241,6 @@ function gitstatus_prompt_update() {
# otherwise add to the Git prompt

if (( PORCELAIN_PROMPT_GIT_REF_ON_DIR_LINE )); then
typeset -g _PORCELAIN_PROMPT_GIT_WHERE=

_PORCELAIN_PROMPT_GIT_STATUS+="$section_context$section_status$section_action%f"
_PORCELAIN_PROMPT_GIT_WHERE="$section_where%f"
else
Expand Down

0 comments on commit b5c0f6d

Please sign in to comment.