about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2022-01-29 16:15:26 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2022-02-20 10:16:54 +0000
commit421f5d7f67976e369ef8613c455d8232e2326f3a (patch)
tree4177823a8db3743b4c52c9a5346028da1d06f10f /Functions
parent80389df48067bab3711ad1604bc9554d08fb9994 (diff)
downloadzsh-421f5d7f67976e369ef8613c455d8232e2326f3a.tar.gz
zsh-421f5d7f67976e369ef8613c455d8232e2326f3a.tar.xz
zsh-421f5d7f67976e369ef8613c455d8232e2326f3a.zip
49728: vcs_info hg mq: Don't include applied patches in the unapplied patches
For instance, with 4 applied patches, 5 unapplied patches, and no guards
involved, the patch-format style would indicate 9 (= 4+5) unapplied patches
and 4 applied patches.
Diffstat (limited to 'Functions')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_hg3
1 files changed, 3 insertions, 0 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index e7123f0bf..ea3798b81 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -183,6 +183,9 @@ if zstyle -T ":vcs_info:${vcs}:${usercontext}:${rrn}" get-mq \
             # Skip commented lines
             [[ ${i_patch} == [[:space:]]#"#"* ]] && continue
 
+            # Skip applied patches
+            (( ${+mqpatches[(re)${i_patch}]} )) && continue
+
             # Separate negative and positive guards to more easily find the
             # intersection of active guards with patch guards
             i_patchguards=( ${(s: :)i_patchguards} )