mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	Merge pull request #8716 from mhinz/vim-patch/wrapped-lines
[RFC] vim-patch.sh: handle wrapped commit messages
This commit is contained in:
		@@ -449,12 +449,21 @@ review_commit() {
 | 
				
			|||||||
    if [[ "${reply}" == y ]]; then
 | 
					    if [[ "${reply}" == y ]]; then
 | 
				
			||||||
      echo
 | 
					      echo
 | 
				
			||||||
      return
 | 
					      return
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  assign_commit_details "${vim_version}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  echo
 | 
				
			||||||
 | 
					  echo "Creating files."
 | 
				
			||||||
 | 
					  echo "${nvim_patch}" > "${NVIM_SOURCE_DIR}/n${patch_file}"
 | 
				
			||||||
  msg_ok "Saved pull request diff to '${NVIM_SOURCE_DIR}/n${patch_file}'."
 | 
					  msg_ok "Saved pull request diff to '${NVIM_SOURCE_DIR}/n${patch_file}'."
 | 
				
			||||||
  CREATED_FILES+=("${NVIM_SOURCE_DIR}/n${patch_file}")
 | 
					  CREATED_FILES+=("${NVIM_SOURCE_DIR}/n${patch_file}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  local nvim="nvim -u NORC -n -i NONE --headless"
 | 
					  local nvim="nvim -u NORC -n -i NONE --headless"
 | 
				
			||||||
  2>/dev/null $nvim --cmd 'set dir=/tmp' +'1,/^$/g/^ /-1join' +w +q "${NVIM_SOURCE_DIR}/n${patch_file}"
 | 
					  2>/dev/null $nvim --cmd 'set dir=/tmp' +'1,/^$/g/^ /-1join' +w +q "${NVIM_SOURCE_DIR}/n${patch_file}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  local expected_commit_message
 | 
					  local expected_commit_message
 | 
				
			||||||
  expected_commit_message="$(commit_message)"
 | 
					  expected_commit_message="$(commit_message)"
 | 
				
			||||||
  local message_length
 | 
					  local message_length
 | 
				
			||||||
@@ -465,12 +474,6 @@ review_commit() {
 | 
				
			|||||||
    msg_ok "Found expected commit message."
 | 
					    msg_ok "Found expected commit message."
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    msg_err "Wrong commit message."
 | 
					    msg_err "Wrong commit message."
 | 
				
			||||||
    echo "  Expected:"
 | 
					 | 
				
			||||||
    echo "${expected_commit_message}"
 | 
					 | 
				
			||||||
    echo "  Actual:"
 | 
					 | 
				
			||||||
    echo "${commit_message#${git_patch_prefix}}"
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    echo "  Expected:"
 | 
					    echo "  Expected:"
 | 
				
			||||||
    echo "${expected_commit_message}"
 | 
					    echo "${expected_commit_message}"
 | 
				
			||||||
    echo "  Actual:"
 | 
					    echo "  Actual:"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user