about summary refs log tree commit diff
path: root/Functions/VCS_Info/VCS_INFO_quilt
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/VCS_INFO_quilt
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/VCS_INFO_quilt')
-rw-r--r--Functions/VCS_Info/VCS_INFO_quilt7
1 files changed, 5 insertions, 2 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index 381b58489..1f20e895d 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -1,5 +1,6 @@
 ## vim:ft=zsh:foldmethod=marker
 
+(( ${+functions[VCS_INFO_quilt-match]} )) ||
 function VCS_INFO_quilt-match() {
     emulate -L zsh
     setopt extendedglob
@@ -20,6 +21,7 @@ function VCS_INFO_quilt-match() {
     return 1
 }
 
+(( ${+functions[VCS_INFO_quilt-standalone-detect]} )) ||
 function VCS_INFO_quilt-standalone-detect() {
     emulate -L zsh
     setopt extendedglob
@@ -58,6 +60,7 @@ function VCS_INFO_quilt-standalone-detect() {
     return 1
 }
 
+(( ${+functions[VCS_INFO_quilt-dirfind]} )) ||
 function VCS_INFO_quilt-dirfind() {
     # This is a wrapper around VCS_INFO_bydir_detect(). It makes sure
     # that $vcs_comm[] is unchanged. Currently, changing anything in it
@@ -80,11 +83,12 @@ function VCS_INFO_quilt-dirfind() {
     return ${ret}
 }
 
+(( ${+functions[VCS_INFO_quilt-patch2subject]} )) ||
 function VCS_INFO_quilt-patch2subject() {
     VCS_INFO_patch2subject "$@"
 }
 
-function VCS_INFO_quilt() {
+{
     emulate -L zsh
     setopt extendedglob
     local mode="$1"
@@ -192,4 +196,3 @@ function VCS_INFO_quilt() {
 
     VCS_INFO_hook 'post-quilt' ${mode} ${patches} ${pc:-\\-nopc-}
 }
-VCS_INFO_quilt "$@"