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.



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