diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-03-26 01:32:50 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-03-27 01:14:42 +0000 |
commit | cb87816b0f47367a763790adabcec1e331156ea2 (patch) | |
tree | 9629cc7f37bfaa9952e580849ba9b0502d32742c /Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr | |
parent | b0d020408a935d2d1c317206e3eda43217d0d453 (diff) | |
download | zsh-cb87816b0f47367a763790adabcec1e331156ea2.tar.gz zsh-cb87816b0f47367a763790adabcec1e331156ea2.tar.xz zsh-cb87816b0f47367a763790adabcec1e331156ea2.zip |
45626: vcs_info: Deduplicate calling the set-branch-format hook.
Diffstat (limited to 'Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr b/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr index b30e0e12b..f1f5527e8 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr @@ -100,14 +100,7 @@ else fi rrn=${bzrbase:t} -zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" branchformat bzrbr || bzrbr="%b:%r" -hook_com=( branch "${bzrinfo[2]}" revision "${bzrinfo[1]}" ) -if VCS_INFO_hook 'set-branch-format' "${bzrbr}"; then - zformat -f bzrbr "${bzrbr}" "b:${hook_com[branch]}" "r:${hook_com[revision]}" -else - bzrbr=${hook_com[branch-replace]} -fi -hook_com=() - +VCS_INFO_set-branch-format "${bzrinfo[2]}" "${bzrinfo[1]}" && + bzrbr="${REPLY}" VCS_INFO_formats '' "${bzrbr}" "${bzrbase}" '' "${bzr_changes}" "${bzrinfo[1]}" "${bzr_changes}" return 0 |