mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
feat(vim-patch.sh): support additional args for -s
This allows creating a draft vim-patch PR.
This commit is contained in:
@ -36,7 +36,7 @@ usage() {
|
||||
echo " can be a Vim version (8.0.xxx) or a Git hash."
|
||||
echo " -P {vim-revision} Download, generate and apply a Vim patch."
|
||||
echo " -g {vim-revision} Download a Vim patch."
|
||||
echo " -s Create a vim-patch pull request."
|
||||
echo " -s [pr args] Create a vim-patch pull request."
|
||||
echo " -r {pr-number} Review a vim-patch pull request."
|
||||
echo " -V Clone the Vim source code to \$VIM_SOURCE_DIR."
|
||||
echo
|
||||
@ -329,7 +329,8 @@ stage_patch() {
|
||||
printf '\nInstructions:\n Proceed to port the patch.\n Try the "patch" command (or use "%s -P ..." next time):\n patch -p1 < %s\n' "${BASENAME}" "${patch_file}"
|
||||
fi
|
||||
|
||||
printf '
|
||||
printf '
|
||||
Stage your changes ("git add ..."), then use "git commit --amend" to commit.
|
||||
|
||||
To port more patches (if any) related to %s,
|
||||
run "%s" again.
|
||||
@ -338,13 +339,19 @@ stage_patch() {
|
||||
|
||||
When you are done, try "%s -s" to create the pull request,
|
||||
or "%s -s --draft" to create a draft pull request.
|
||||
|
||||
|
||||
See the wiki for more information:
|
||||
* https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-vim
|
||||
' "${vim_version}" "${BASENAME}" "${BASENAME}"
|
||||
return $ret
|
||||
}
|
||||
|
||||
gh_pr() {
|
||||
local pr_title
|
||||
local pr_body
|
||||
pr_title="$1"
|
||||
|
||||
pr_body="$2"
|
||||
shift 2
|
||||
gh pr create --title "${pr_title}" --body "${pr_body}" "$@"
|
||||
}
|
||||
|
||||
@ -408,7 +415,7 @@ submit_pr() {
|
||||
if output="$(git push "$push_remote" "$checked_out_branch" 2>&1)"; then
|
||||
msg_ok "$output"
|
||||
else
|
||||
msg_err "$output"
|
||||
msg_err "$output"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -799,7 +806,8 @@ while getopts "hlLmMVp:P:g:r:s" opt; do
|
||||
exit 0
|
||||
;;
|
||||
g)
|
||||
get_vimpatch "${OPTARG}"
|
||||
get_vimpatch "${OPTARG}"
|
||||
exit 0
|
||||
;;
|
||||
r)
|
||||
review_pr "${OPTARG}"
|
||||
|
Reference in New Issue
Block a user