summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-06-13 12:50:45 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-06-13 12:50:45 -0700
commit4d605b0f38775066be0eaed33c52e0b716035498 (patch)
tree2dfd13dc49b7105ebc566e67058583ba08c8bb60 /contrib/completion/git-completion.bash
parentMerge branch 'sb/submodule-merge-in-merge-recursive' (diff)
parentcompletion: correct zsh detection when run from git-completion.zsh (diff)
downloadtgif-4d605b0f38775066be0eaed33c52e0b716035498.tar.xz
Merge branch 'sg/completion-zsh-workaround'
Work around zsh segfaulting when loading git-completion.zsh * sg/completion-zsh-workaround: completion: correct zsh detection when run from git-completion.zsh
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 12814e9bbf..dd3e925843 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3223,7 +3223,10 @@ __gitk_main ()
__git_complete_revlist
}
-if [[ -n ${ZSH_VERSION-} ]]; then
+if [[ -n ${ZSH_VERSION-} ]] &&
+ # Don't define these functions when sourced from 'git-completion.zsh',
+ # it has its own implementations.
+ [[ -z ${GIT_SOURCING_ZSH_COMPLETION-} ]]; then
echo "WARNING: this script is deprecated, please see git-completion.zsh" 1>&2
autoload -U +X compinit && compinit