Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 1/2] vcs_info git: Produce nicer applied-string messages for 'exec' actions.
- X-seq: zsh-workers 39423
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 1/2] vcs_info git: Produce nicer applied-string messages for 'exec' actions.
- Date: Fri, 23 Sep 2016 06:47:31 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=5Zd76CRzyY5a8IhURiF+HD+T0Ag=; b=DlKHzw L8hBUEz3kpjJkCPg4v0xcIm+FKqhAlvZzXJFLDLCFb2E03NqGuX/dbg69A+PdNGC TQIVsexcQJHMYy/5W1UMPDeJx31aGvk412Qg1S0Y+VfKyGxjGXtlThzZhR7ZOpgV cw5D1Sit6ivXVALt/JebyJpDKsQI3+QaYb3Hs=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=5Zd76CRzyY5a8IhURiF+HD+T0A g=; b=NbXS4TIqAGHsreHq3OQms1dZqN+7OrwmLMvNKFcAqIC2VFsxvp6aZMKaAy XTRv0WP5dMLLaUfE8G3GR89h7mO3gk/z90P8Pxu/ZmMExb0Ef8pVtFY9+cdwrMeu deX6aHVrdPctybqVp9Jo0L4XA4lMiMhXVCXSjmfTEzC5ZhdZI=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This changes the behaviour on "unknown" git-rebase actions (those other
than pick/reword/edit/fixup/squash/execute).
---
Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 472c10d..18ba89a 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 '^#')"})
Messages sorted by:
Reverse Date,
Date,
Thread,
Author