1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-18 00:51:07 +02:00

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.
This commit is contained in:
Daniel Shahaf 2020-03-12 18:48:52 +00:00
parent af57462beb
commit c756545014
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,9 @@
2020-03-15 Daniel Shahaf <danielsh@apache.org>
* 45546: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
vcs_info git: In interactive rebases, properly support the full
form of the "exec" verb.
* 45545: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
vcs_info git: In interactive rebases, ignore comment lines.

View file

@ -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.