add --edit: truncate the patch file
[gitweb.git] / contrib / completion / git-completion.bash
index 12814e9bbf6be5ff0d1608c71554c2b4bb14c87d..dd3e925843acf53c439e504101d46d8606ea5d69 100644 (file)
@@ -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