vim-patch.sh: improve patching [ci skip] #10154

(fuzz, unified, exit)

Fixes https://github.com/neovim/neovim/issues/10143
This commit is contained in:
Daniel Hahler
2019-06-08 14:42:17 +02:00
committed by Justin M. Keyes
parent 230e75b63f
commit 766657320a

View File

@@ -205,7 +205,7 @@ get_vimpatch() {
assign_commit_details "${1}"
git log -1 "${vim_commit}" -- >/dev/null 2>&1 || {
>&2 msg_err "Couldn't find Vim revision '${vim_commit}'."
>&2 msg_err "Couldn't find Vim revision '${vim_commit}'."
exit 3
}
msg_ok "Found Vim revision '${vim_commit}'."
@@ -251,14 +251,14 @@ stage_patch() {
msg_ok "${output}" ||
(msg_err "${output}"; false)
fi
printf "\nCreating empty commit with correct commit message.\n"
output="$(commit_message | git commit --allow-empty --file 2>&1 -)" &&
msg_ok "${output}" ||
(msg_err "${output}"; false)
local ret=0
if test -n "$try_apply" ; then
if ! check_executable patch; then
if test -n "$try_apply" ; then
if ! check_executable patch; then
printf "\n"
msg_err "'patch' command not found\n"
@@ -278,6 +278,7 @@ stage_patch() {
run "%s" again.
* Do this only for _related_ patches (otherwise it increases the
size of the pull request, making it harder to review)
When you are done, try "%s -s" to create the pull request.
See the wiki for more information:
@@ -563,7 +564,7 @@ while getopts "hlLMVp:P:g:r:s" opt; do
list_missing_vimpatches
exit 0
;;
M)
M)
list_vimpatch_numbers
exit 0
;;