diff options
Diffstat (limited to 'Functions/VCS_Info/Backends')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 11 | ||||
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 9 |
2 files changed, 2 insertions, 18 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 69ed24a2c..9e0749cf5 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -125,16 +125,7 @@ VCS_INFO_git_handle_patches () { git_patches_unapplied=(${(Oa)git_patches_unapplied}) (( git_all = ${#git_patches_applied} + ${#git_patches_unapplied} )) - if VCS_INFO_hook 'gen-applied-string' "${git_patches_applied[@]}"; then - if (( ${#git_patches_applied} )); then - git_applied_s=${git_patches_applied[1]} - else - git_applied_s="" - fi - else - git_applied_s=${hook_com[applied-string]} - fi - hook_com=() + VCS_INFO_set-patch-format 'git_patches_applied' 'git_applied_s' if VCS_INFO_hook 'gen-unapplied-string' "${git_patches_unapplied[@]}"; then git_unapplied_s=${#git_patches_unapplied} else diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg index 69b7db304..19bec7af1 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg @@ -203,14 +203,7 @@ if zstyle -T ":vcs_info:${vcs}:${usercontext}:${rrn}" get-mq \ done < ${mqseriesfile} fi - if VCS_INFO_hook 'gen-applied-string' "${mqpatches[@]}"; then - (( ${#mqpatches} )) && applied_string=${mqpatches[1]} - else - applied_string=${hook_com[applied-string]} - fi - - hook_com=() - + VCS_INFO_set-patch-format 'mqpatches' 'applied_string' if VCS_INFO_hook 'gen-unapplied-string' "${mqunapplied[@]}"; then unapplied_string=${#mqunapplied} else |