about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2020-03-12 18:48:52 +0000
committerDaniel Shahaf <danielsh@apache.org>2020-03-15 00:18:23 +0000
commitc756545014c93448494ee4f1d841d8487601a324 (patch)
tree7147b1cde953f513f5b063408c460eed9fe9797a /Functions
parentaf57462beb38159637eba7004363d867f41eff50 (diff)
downloadzsh-c756545014c93448494ee4f1d841d8487601a324.tar.gz
zsh-c756545014c93448494ee4f1d841d8487601a324.tar.xz
zsh-c756545014c93448494ee4f1d841d8487601a324.zip
45546: vcs_info git: In interactive rebases, properly support the full form of the "exec" verb.
The code before this commit happened to have done the right thing:
"exec" lines were handled by the catchall forward compatibility case,
which happened to have had virtually the same effect as the correct
case.  However, that was merely an accidental result.  This patch makes
the code do the right thing deliberately, rather than by accident.
Diffstat (limited to 'Functions')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git4
1 files changed, 2 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 a8f49e24a..d8e5d1ff1 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -229,11 +229,11 @@ elif [[ -d "${gitdir}/rebase-merge" ]]; then
                         p="${p%% *} ?"
                 fi
                 ;;
-            (x *)
+            ((x|exec) *)
                 # The line is of the form 'exec foo bar baz' where 'foo bar
                 # baz' is a shell command.  There's no way to map _that_ to
                 # "$hash $subject", but I hope this counts as making an effort.
-                p=${p/x /exec }
+                p=${p/#x /exec }
                 ;;
             (*)
                 # Forward compatibility with not-yet-existing 'git rebase -i' verbs.