mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 00:51:53 +00:00
Merge #41103 from janlazo/na-hunk-header
This commit is contained in:
@@ -917,6 +917,7 @@ is_na_patch() {
|
||||
local NA_REGEXP="$NVIM_SOURCE_DIR/scripts/vim_na_regexp.txt"
|
||||
local NA_FILELIST="$NVIM_SOURCE_DIR/scripts/vim_na_files.txt"
|
||||
local NA_HUNKS_C="$NVIM_SOURCE_DIR/scripts/vim_na_hunks_c.txt"
|
||||
local NA_HUNKS_H="$NVIM_SOURCE_DIR/scripts/vim_na_hunks_h.txt"
|
||||
local NA_HUNKS_VIM="$NVIM_SOURCE_DIR/scripts/vim_na_hunks_vim.txt"
|
||||
|
||||
local FILES_REMAINING HUNKS HUNK_NUM_FINAL
|
||||
@@ -955,8 +956,12 @@ is_na_patch() {
|
||||
'-I^\s*INIT\(= .+"E[0-9]+: .*:def ' \
|
||||
'-I^\s*INIT\(= .+"E[0-9]+: .*enddef"' \
|
||||
'-I^\s*INIT\(= .+"E[0-9]+: .*[vV]im9' \
|
||||
"$patch" -- "$file")
|
||||
test -n "${HUNKS}" && return 1
|
||||
"$patch" -- "${file}" |
|
||||
grep '^@@ .* @@')
|
||||
if test -n "$HUNKS"; then
|
||||
HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ \?//' | grep -cv -f "$NA_HUNKS_H")
|
||||
test "$HUNK_NUM_FINAL" -ne 0 && return 1
|
||||
fi
|
||||
;;
|
||||
*.c)
|
||||
HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
^build_argv_from_[a-zA-Z0-9_]\+(
|
||||
^change_compatible(
|
||||
^check_restricted(
|
||||
^compatible_set(void)
|
||||
@@ -43,6 +44,7 @@
|
||||
^f_test_void(
|
||||
^l\?alloc(size_t
|
||||
^l\?alloc[a-zA-Z0-9_]\+(size_t
|
||||
^mch_job_[a-z]\+(
|
||||
^mem_[a-zA-Z0-9_]\+(
|
||||
^restore_buffer(bufref_T
|
||||
^static int included_patches\[\] =
|
||||
|
||||
1
scripts/vim_na_hunks_h.txt
Normal file
1
scripts/vim_na_hunks_h.txt
Normal file
@@ -0,0 +1 @@
|
||||
^struct type_S {
|
||||
@@ -65,6 +65,7 @@
|
||||
^src/po/.*\.desktop
|
||||
^src/po/.*sjis
|
||||
^src/proto
|
||||
^src/testdir/.*_ramp.vim
|
||||
^src/testdir/dumps/
|
||||
^src/testdir/keycode_check\.
|
||||
^src/testdir/python
|
||||
|
||||
Reference in New Issue
Block a user