summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorFrank Terbeck <ft@bewatermyfriend.org>2015-10-18 20:27:55 +0200
committerFrank Terbeck <ft@bewatermyfriend.org>2015-10-18 20:40:18 +0200
commit2e600b432a1a0167304ba5b57738b9f5c0af1cc3 (patch)
treeb4138136eccae4787c23582888f775c0cabdbaf9 /Functions
parent21b6852b15c563c434ae053b71d109e4c6010479 (diff)
downloadzsh-2e600b432a1a0167304ba5b57738b9f5c0af1cc3.tar.gz
zsh-2e600b432a1a0167304ba5b57738b9f5c0af1cc3.tar.xz
zsh-2e600b432a1a0167304ba5b57738b9f5c0af1cc3.zip
36888: vcs_info: Prevent warn_create_global warning with '-preinit-' state
This is related to 33405. Turns out that not all other calls to
VCS_INFO_set are okay: With recent zsh versions the early call to that
function with the '-preinit-' argument causes a warning like this:

  VCS_INFO_set:9: math parameter maxexports created globally
                  in function VCS_INFO_set

This fixes it.
Diffstat (limited to 'Functions')
-rw-r--r--Functions/VCS_Info/vcs_info2
1 files changed, 2 insertions, 0 deletions
diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info
index 350b189e9..628dde9b1 100644
--- a/Functions/VCS_Info/vcs_info
+++ b/Functions/VCS_Info/vcs_info
@@ -11,6 +11,7 @@
 setopt localoptions noksharrays extendedglob NO_shwordsplit
 local file func sys
 local -a static_functions
+local -i maxexports
 
 static_functions=(
     VCS_INFO_adjust
@@ -38,6 +39,7 @@ for func in ${static_functions} ; do
 done
 
 [[ -n ${(Mk)parameters:#vcs_info_msg_<->_} ]] && unset ${parameters[(I)vcs_info_msg_<->_]}
+VCS_INFO_maxexports
 VCS_INFO_set --nvcs '-preinit-'
 vcs_info_setsys