about summary refs log tree commit diff
path: root/Functions/VCS_Info/VCS_INFO_set-patch-format
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2017-02-01 19:05:44 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2017-02-03 18:14:00 +0000
commit9211d7f2777abaedfacf98812104d579c3b861f3 (patch)
treebb95d08f95ef92615e6bb2f6005e3080168721cb /Functions/VCS_Info/VCS_INFO_set-patch-format
parentfca4f90bbac07b8e9bb29ae3267aeccf0f85d56d (diff)
downloadzsh-9211d7f2777abaedfacf98812104d579c3b861f3.tar.gz
zsh-9211d7f2777abaedfacf98812104d579c3b861f3.tar.xz
zsh-9211d7f2777abaedfacf98812104d579c3b861f3.zip
40479: vcs_info set-patch-format: Prepare for more code sharing between the callers.
This changes hook invocation order in the hg backend.
Diffstat (limited to 'Functions/VCS_Info/VCS_INFO_set-patch-format')
-rw-r--r--Functions/VCS_Info/VCS_INFO_set-patch-format3
1 files changed, 3 insertions, 0 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_set-patch-format b/Functions/VCS_Info/VCS_INFO_set-patch-format
index c0617044c..5534e4832 100644
--- a/Functions/VCS_Info/VCS_INFO_set-patch-format
+++ b/Functions/VCS_Info/VCS_INFO_set-patch-format
@@ -8,6 +8,8 @@
 # $4 - name of a parameter to store the unapplied-string in
 # $5 - context argument for use in zstyle getters
 # $6 - name of a parameter to store a patch-format format string in
+# $7 - name of an assoc parameter with extra $hook_com key-value pairs for the
+#      set-patch-format hook invocation, or '' for none
 #
 # Output:
 # - $hook_com is overwritten and the keys 'applied', 'applied-n',
@@ -48,4 +50,5 @@
       unapplied "${(P)4}"
     )
     hook_com[all-n]=$(( ${hook_com[applied-n]} + ${hook_com[unapplied-n]} ))
+    hook_com+=( ${7:+"${(@kvP)7}"} )
 }