From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18447 invoked by alias); 30 Mar 2011 20:54:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28961 Received: (qmail 19765 invoked from network); 30 Mar 2011 20:53:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: zsh-workers@zsh.org Subject: PATCH: (3/4) vcs_info: Add `no-vcs' hook Date: Wed, 30 Mar 2011 22:37:15 +0200 Message-Id: <1301517436-11451-4-git-send-email-ft@bewatermyfriend.org> X-Mailer: git-send-email 1.7.4.1.140.g89781 In-Reply-To: <1301517436-11451-1-git-send-email-ft@bewatermyfriend.org> References: <1301517436-11451-1-git-send-email-ft@bewatermyfriend.org> X-Df-Sender: 430444 --- Doc/Zsh/contrib.yo | 5 +++++ Functions/VCS_Info/VCS_INFO_set | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 5c82c5d..bc4a814 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -1307,6 +1307,11 @@ When setting tt(ret) to non-zero, the string in tt(${hook_com[guards-string]}) will be used in the var(%g) escape in the tt(patch-format) and tt(nopatch-format) styles. ) +item(tt(no-vcs))( +This hooks is called when no version control system was detected. + +The `hook_com' parameter is not used. +) item(tt(post-quilt))( Called after the tt(quilt) support is done. The following information is passed as arguments to the hook: 1. the quilt-support mode (`addon' or diff --git a/Functions/VCS_Info/VCS_INFO_set b/Functions/VCS_Info/VCS_INFO_set index a2b838c..23dc06b 100644 --- a/Functions/VCS_Info/VCS_INFO_set +++ b/Functions/VCS_Info/VCS_INFO_set @@ -16,6 +16,7 @@ if [[ $1 == '--nvcs' ]] ; then typeset -gx vcs_info_msg_${i}_= done VCS_INFO_nvcsformats $2 + [[ $2 != '-preinit-' ]] && VCS_INFO_hook "no-vcs" fi (( ${#msgs} - 1 < 0 )) && return 0 -- 1.7.4.1.140.g89781