mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
vim-patch.sh: git-for-each-ref: use strip [ci skip] #10169
- It is a synonym for lstrip, which works with older Git versions also (2.7.4, Ubuntu Xenial). - exit in case of errors from git-foreach-ref - msg_err: echo to stderr Ref: https://github.com/neovim/neovim/pull/10165#issuecomment-500164356
This commit is contained in:

committed by
Justin M. Keyes

parent
a2bb63c182
commit
b74da2ff3e
@@ -41,7 +41,7 @@ msg_ok() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg_err() {
|
msg_err() {
|
||||||
printf '\e[31m✘\e[0m %s\n' "$@"
|
printf '\e[31m✘\e[0m %s\n' "$@" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if a program is in the user's PATH, and is executable.
|
# Checks if a program is in the user's PATH, and is executable.
|
||||||
@@ -393,10 +393,15 @@ list_missing_vimpatches() {
|
|||||||
|
|
||||||
# Find all "vim-patch:xxx" tokens in the Nvim git log.
|
# Find all "vim-patch:xxx" tokens in the Nvim git log.
|
||||||
for token in $(list_vimpatch_tokens); do
|
for token in $(list_vimpatch_tokens); do
|
||||||
tokens[$token]=1
|
tokens[$token]=1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Create an associative array mapping Vim commits to tags.
|
# Create an associative array mapping Vim commits to tags.
|
||||||
|
eval "declare -A vim_commit_tags=(
|
||||||
|
$(git -C "${VIM_SOURCE_DIR}" for-each-ref refs/tags \
|
||||||
|
--format '[%(objectname)]=%(refname:strip=2)' \
|
||||||
|
--sort='-*authordate' \
|
||||||
|
--shell)
|
||||||
)"
|
)"
|
||||||
# Exit in case of errors from the above eval (empty vim_commit_tags).
|
# Exit in case of errors from the above eval (empty vim_commit_tags).
|
||||||
if ! (( "${#vim_commit_tags[@]}" )); then
|
if ! (( "${#vim_commit_tags[@]}" )); then
|
||||||
|
Reference in New Issue
Block a user