d792b1114c570ec1520ba7696c5c110d10cea41c

Author
catull <catull@users.noreply.github.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

With zsh 5.4 a simple "local FLAGS" meant as an array must be explicitly declared so.  This fix avoids the dreaded "parse_git_dirty:3: FLAGS: attempt to assign array value to non-array". (#6414)

Diff

 1diff --git a/lib/git.zsh b/lib/git.zsh
 2index f7eccb81d933ca2a59a98824e5eb561bcc94312e..167b4b0eae639fca500d973210320bf5647ab177 100644
 3--- a/lib/git.zsh
 4+++ b/lib/git.zsh
 5@@ -11,7 +11,7 @@ function git_prompt_info() {
 6 # Checks if working tree is dirty
 7 function parse_git_dirty() {
 8   local STATUS=''
 9-  local FLAGS
10+  local -a FLAGS
11   FLAGS=('--porcelain')
12   if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then
13     if [[ $POST_1_7_2_GIT -gt 0 ]]; then