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>2017-01-23 18:15:35 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2017-01-25 04:22:32 +0000
commit2854a67e09748a2e6f4e1d8a73bc463bad4cbd4e (patch)
tree6f656b8bb66efa00fe635515f5b98bc5149bd40a /Functions/VCS_Info/VCS_INFO_quilt
parentedd9798de765049a904e0afa830b191d1932087d (diff)
downloadzsh-2854a67e09748a2e6f4e1d8a73bc463bad4cbd4e.tar.gz
zsh-2854a67e09748a2e6f4e1d8a73bc463bad4cbd4e.tar.xz
zsh-2854a67e09748a2e6f4e1d8a73bc463bad4cbd4e.zip
40403/0004: vcs_info set-patch-format helper: Part #4.
This also fixes the %a (${hook_com[all-n]}) expando in the hg backend:
before this change, it counted only unapplied changes.
Diffstat (limited to 'Functions/VCS_Info/VCS_INFO_quilt')
-rw-r--r--Functions/VCS_Info/VCS_INFO_quilt9
1 files changed, 2 insertions, 7 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index a81da1c49..aed9f0c33 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -91,7 +91,7 @@ function VCS_INFO_quilt() {
     local patches pc tmp qstring root
     local -i ret
     local context
-    local -a applied unapplied all applied_string unapplied_string quiltcommand quilt_env
+    local -a applied unapplied applied_string unapplied_string quiltcommand quilt_env
     local -A hook_com
 
     context=":vcs_info:${vcs}.quilt-${mode}:${usercontext}:${rrn}"
@@ -171,17 +171,12 @@ function VCS_INFO_quilt() {
       }
     fi
 
-    all=( ${(Oa)applied} ${unapplied} )
-
     VCS_INFO_set-patch-format 'applied' 'applied_string' \
                               'unapplied' 'unapplied_string' \
                               ${context} qstring
-
-    hook_com=( applied "${applied_string}" unapplied "${unapplied_string}"
-               applied-n ${#applied}       unapplied-n ${#unapplied}       all-n ${#all} )
     if VCS_INFO_hook 'set-patch-format' ${qstring}; then
         zformat -f qstring "${qstring}" "p:${hook_com[applied]}" "u:${hook_com[unapplied]}" \
-                                        "n:${#applied}" "c:${#unapplied}" "a:${#all}"
+                                        "n:${#applied}" "c:${#unapplied}" "a:${hook_com[all-n]}"
     else
         qstring=${hook_com[patch-replace]}
     fi