about summary refs log tree commit diff
path: root/Functions/VCS_Info/Backends/VCS_INFO_detect_p4
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2018-10-07 17:46:40 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2018-10-08 13:41:41 +0000
commita05533e425ebb36044680f403666dab7bc26a075 (patch)
tree144d294e6c989465c5272a3776d62ee8fc7977db /Functions/VCS_Info/Backends/VCS_INFO_detect_p4
parentc4144bc95b26c41e7c45c5185112f87f9145d94f (diff)
downloadzsh-a05533e425ebb36044680f403666dab7bc26a075.tar.gz
zsh-a05533e425ebb36044680f403666dab7bc26a075.tar.xz
zsh-a05533e425ebb36044680f403666dab7bc26a075.zip
43618: vcs_info: Don't redefine helper functions on every execution of the autoloadable outer function.
This allows enabling tracing of the helper functions without fned'ing
the outer function.
Diffstat (limited to 'Functions/VCS_Info/Backends/VCS_INFO_detect_p4')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_detect_p42
1 files changed, 2 insertions, 0 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_detect_p4 b/Functions/VCS_Info/Backends/VCS_INFO_detect_p4
index 95a534786..d171c68ee 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_detect_p4
+++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_p4
@@ -16,6 +16,7 @@
 # of having such files in all client root directories and nowhere above.
 
 
+(( ${+functions[VCS_INFO_p4_get_server]} )) ||
 VCS_INFO_p4_get_server() {
   emulate -L zsh
   setopt extendedglob
@@ -43,6 +44,7 @@ VCS_INFO_p4_get_server() {
 }
 
 
+(( ${+functions[VCS_INFO_detect_p4]} )) ||
 VCS_INFO_detect_p4() {
   local serverport p4where