summaryrefslogtreecommitdiff
path: root/Functions/VCS_Info/Backends
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2016-12-04 04:32:03 +0100
committerAxel Beckert <abe@deuxchevaux.org>2016-12-04 04:32:03 +0100
commit3e439c3863f14c82f70666804c8570a13b3732e6 (patch)
tree07036c43e0f3f9242bb6dd42cd2a849ec8ea8aca /Functions/VCS_Info/Backends
parent2aedc4b88fd0e87b89583983951b04b96f48efd3 (diff)
parent7b7e84f0815ed22a0ee348a217776529035dccf3 (diff)
downloadzsh-3e439c3863f14c82f70666804c8570a13b3732e6.tar.gz
zsh-3e439c3863f14c82f70666804c8570a13b3732e6.zip
Merge tag 'zsh-5.2-test-1' into debian
Diffstat (limited to 'Functions/VCS_Info/Backends')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git8
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_hg7
2 files changed, 10 insertions, 5 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 472c10d5d..18ba89a9a 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -213,8 +213,12 @@ elif [[ -d "${gitdir}/rebase-merge" ]]; then
local p
[[ -f "${patchdir}/done" ]] &&
for p in ${(f)"$(< "${patchdir}/done")"}; do
- # remove action
- git_patches_applied+=("${${(s: :)p}[2,-1]}")
+ # pick/edit/fixup/squash/reword: Add "$hash $subject" to $git_patches_applied.
+ # exec: Add "exec ${command}" to $git_patches_applied.
+ # (anything else): As 'exec'.
+ p=${p/(#s)(p|pick|e|edit|r|reword|f|fixup|s|squash) /}
+ p=${p/(#s)x /exec }
+ git_patches_applied+=("$p")
done
if [[ -f "${patchdir}/git-rebase-todo" ]] ; then
git_patches_unapplied=(${(f)"$(grep -v '^$' "${patchdir}/git-rebase-todo" | grep -v '^#')"})
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index f35ad5965..69b7db304 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -40,9 +40,10 @@ VCS_INFO_adjust
# Disabled by default anyway, so no harm done.
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" use-simple \
- && ( VCS_INFO_check_com hexdump ) && [[ -r ${dirstatefile} ]] ; then
- # Calling hexdump is (much) faster than hg but doesn't get the local rev
- r_csetid=$(hexdump -n 20 -e '1/1 "%02x"' ${dirstatefile})
+ && VCS_INFO_hexdump ${dirstatefile} 20 ; then
+ # Calling VCS_INFO_hexdump is (much) faster than hg but doesn't get
+ # the local rev
+ r_csetid=$REPLY
else
# Settling for a short (but unique!) hash because getting the full
# 40-char hash in addition to all the other info we want isn't