aboutsummaryrefslogtreecommitdiff
path: root/scripts/vim-patch.sh
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-08-21 08:37:49 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-08-21 08:37:49 +0200
commit8872fce120b0d38d50254c82407038d40da84647 (patch)
tree2b4170788852b9ddb0067e0cce69827397c65ab3 /scripts/vim-patch.sh
parent150b1b7b40957b1b4d89e0182e685d39e33ef227 (diff)
downloadrneovim-8872fce120b0d38d50254c82407038d40da84647.tar.gz
rneovim-8872fce120b0d38d50254c82407038d40da84647.tar.bz2
rneovim-8872fce120b0d38d50254c82407038d40da84647.zip
vim-patch.sh: Also check for .git/ directory
In the case of nested repos, such as when "neovim/" repo contains "neovim/.vim-src/" repo, git rev-parse --show-toplevel returns the fullpath to the "neovim/" repo, which failed the condition. ref #8875 ref c05d7153d315
Diffstat (limited to 'scripts/vim-patch.sh')
-rwxr-xr-xscripts/vim-patch.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh
index 9ea43383b6..bba76ffa97 100755
--- a/scripts/vim-patch.sh
+++ b/scripts/vim-patch.sh
@@ -86,7 +86,8 @@ get_vim_sources() {
cd "${VIM_SOURCE_DIR}"
else
cd "${VIM_SOURCE_DIR}"
- if [[ "$(git rev-parse --show-toplevel)" != "${VIM_SOURCE_DIR}" ]]; then
+ if ! [ -d ".git" ] \
+ && ! [ "$(git rev-parse --show-toplevel)" = "${VIM_SOURCE_DIR}" ]; then
msg_err "${VIM_SOURCE_DIR} does not appear to be a git repository."
echo " Please remove it and try again."
exit 1