fix(vim-patch.sh)

In scripts/vim-patch.sh line 335:
      printf '
             ^-- SC2183 (warning): This format string has 4 variables, but is passed 3 arguments.

    In scripts/vim-patch.sh line 597:
      list_missing_vimpatches 1 "$@" | while read -r vim_commit; do
                                                     ^--------^ SC2030 (info): Modification of vim_commit is local (to subshell caused by pipeline)

    In scripts/vim-patch.sh line 626:
      done < <(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id --name-only -r "${vim_commit}" -- . ':!src/version.c')
                                                                                   ^-----------^ SC2031 (info): vim_commit was modified in a subshell. That change might be lost.

    For more information:
      https://www.shellcheck.net/wiki/SC2183 -- This format string has 4 variable...
      https://www.shellcheck.net/wiki/SC2030 -- Modification of vim_commit is loc...
      https://www.shellcheck.net/wiki/SC2031 -- vim_commit was modified in a subs...
This commit is contained in:
Justin M. Keyes
2022-05-28 09:49:58 -07:00
parent eab4d03a32
commit c43e2874c0

View File

@@ -4,6 +4,8 @@ set -e
set -u set -u
# Use privileged mode, which e.g. skips using CDPATH. # Use privileged mode, which e.g. skips using CDPATH.
set -p set -p
# https://www.shellcheck.net/wiki/SC2031
shopt -s lastpipe
# Ensure that the user has a bash that supports -A # Ensure that the user has a bash that supports -A
if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then
@@ -345,7 +347,7 @@ stage_patch() {
To port more patches (if any) related to %s, To port more patches (if any) related to %s,
run "%s" again. run "%s" again.
* Do this only for _related_ patches (otherwise it increases the * Do this only for _related_ patches (otherwise it increases the
size of the pull request, making it harder to review) size of the pull request, making it harder to review)
When you are done, try "%s -s" to create the pull request, When you are done, try "%s -s" to create the pull request,