diff options
author | James McCoy <jamessan@jamessan.com> | 2016-12-15 09:09:52 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-12-15 09:09:52 -0500 |
commit | 412d87698fd80f8c2f9d7badfd1a308bb241eebf (patch) | |
tree | 1d5925ca588d0c97fe474d371dd9fd3671eeaa92 /scripts/vim-patch.sh | |
parent | 02a9824438adb89eed8b0230068bb95bbf7ce97c (diff) | |
download | rneovim-412d87698fd80f8c2f9d7badfd1a308bb241eebf.tar.gz rneovim-412d87698fd80f8c2f9d7badfd1a308bb241eebf.tar.bz2 rneovim-412d87698fd80f8c2f9d7badfd1a308bb241eebf.zip |
vim-patch: Allow skipping non-"vim-patch" commits during review
It's not atypical to have extra, non-"vim-patch" commits in a PR merging
a bigger or set of related patches from Vim. Rather than immediately
aborting, display the patch header to the user and let them decide
whether to continue reviewing.
Diffstat (limited to 'scripts/vim-patch.sh')
-rwxr-xr-x | scripts/vim-patch.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 28aa53b3c9..b5d795424b 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -366,6 +366,14 @@ review_commit() { echo "✘ Could not detect the Vim patch number." echo " This script assumes that the PR contains only commits" echo " with 'vim-patch:XXX' in their title." + echo + printf -- "$(head -n 4 <<< "${nvim_patch}")\n\n" + local reply + read -p "Continue reviewing (y/N)? " -n 1 -r reply + if [[ ! "${reply}" =~ ^[Nn]$ ]]; then + echo + return + fi exit 1 fi |