aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-08-27 23:44:48 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-08-27 23:44:48 -0400
commita7ec1a5f502e290f1e7d655ac225219c4d2c510e (patch)
tree6b725da84d47ab01328e7dd8d2584d829df37ec5
parentaafbe5d28ab2060f704de61fe5011419002b2b2b (diff)
downloadrneovim-a7ec1a5f502e290f1e7d655ac225219c4d2c510e.tar.gz
rneovim-a7ec1a5f502e290f1e7d655ac225219c4d2c510e.tar.bz2
rneovim-a7ec1a5f502e290f1e7d655ac225219c4d2c510e.zip
vim-patch.sh: best-effort for older git.
-rwxr-xr-xscripts/vim-patch.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh
index 73cba243f7..a1b58c7c91 100755
--- a/scripts/vim-patch.sh
+++ b/scripts/vim-patch.sh
@@ -168,9 +168,16 @@ list_vim_patches() {
local vim_tags=$(cd "${VIM_SOURCE_DIR}" && \
git tag --contains v7.4.442)
- # Get "runtime update" commits since e2719096.
- local vim_runtime_commits=$(cd "${VIM_SOURCE_DIR}" && \
- git log --format='%H' --grep='^patch' --grep='^updated for version' --invert-grep e2719096250a19ecdd9a35d13702879f163d2a50..HEAD)
+ # Get non-versioned commits since e2719096.
+ if git log -1 --grep='.' --invert-grep > /dev/null 2>&1 ; then
+ local vim_runtime_commits=$(cd "${VIM_SOURCE_DIR}" && \
+ git log --format='%H' --grep='^patch' --grep='^updated for version' --invert-grep e2719096250a19ecdd9a35d13702879f163d2a50..HEAD)
+ else
+ # --invert-grep requires git 2.4+
+ echo "Warning: some runtime updates may not be listed (requires git 2.4+)."
+ local vim_runtime_commits=$(cd "${VIM_SOURCE_DIR}" && \
+ git log --format='%H' --grep='Updated' e2719096250a19ecdd9a35d13702879f163d2a50..HEAD)
+ fi
local vim_commit
for vim_commit in ${vim_tags} ${vim_runtime_commits}; do