From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=FROM_FMBLA_NEWDOM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id a9ad4485 for ; Sun, 1 Dec 2019 00:06:22 +0000 (UTC) Received: (qmail 725 invoked by alias); 1 Dec 2019 00:05:37 -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: List-Unsubscribe: X-Seq: 44962 Received: (qmail 28905 invoked by uid 1010); 1 Dec 2019 00:05:37 -0000 X-Qmail-Scanner-Diagnostics: from wout5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25642. spamassassin: 3.4.2. Clear:RC:0(64.147.123.21):SA:0(-0.4/5.0):. Processed in 7.596116 secs); 01 Dec 2019 00:05:37 -0000 X-Envelope-From: danielsh@apache.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: softfail (ns1.primenet.com.au: transitioning SPF record at amazonses.com does not designate 64.147.123.21 as permitted sender) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudejvddgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgogfeguddtqddvjeculdegtddmnecujfgurhephf fvufffkffosedttdertdertddtnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceo uggrnhhivghlshhhsegrphgrtghhvgdrohhrgheqnecukfhppeejledrudektddrheejrd duudelnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurghnihgvlhhshhesrghprggthhgv rdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH 1/3] vcs_info: Document internal function and variable Date: Sun, 1 Dec 2019 00:04:46 +0000 Message-Id: <20191201000448.21880-1-danielsh@apache.org> X-Mailer: git-send-email 2.11.0 --- Functions/VCS_Info/VCS_INFO_bydir_detect | 12 ++++++++++++ Functions/VCS_Info/vcs_info | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/Functions/VCS_Info/VCS_INFO_bydir_detect b/Functions/VCS_Info/VCS_INFO_bydir_detect index b20c05c9c..29b261413 100644 --- a/Functions/VCS_Info/VCS_INFO_bydir_detect +++ b/Functions/VCS_Info/VCS_INFO_bydir_detect @@ -2,6 +2,18 @@ ## Written by Frank Terbeck ## Distributed under the same BSD-ish license as zsh itself. +# Helper function for VCS_INFO_detect_* +# +# Usage: +# vcs_comm[detect_need_file]=FILENAMES VCS_INFO_bydir_detect DIRNAME +# where DIRNAME is a directory name and FILENAMES is a space-separated list +# of filenames. +# +# If any parent directory of the current working directory, other than the root +# directory, contains a subdirectory named DIRNAME that contains a file whose name +# is in FILENAMES, set vcs_comm[basedir] to the path of that parent directory and +# return true. Otherwise, return false. + setopt localoptions NO_shwordsplit local dirname=$1 local basedir="." file diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info index d67ae6bf5..9f48bee75 100644 --- a/Functions/VCS_Info/vcs_info +++ b/Functions/VCS_Info/vcs_info @@ -59,6 +59,12 @@ vcs_info () { local -x LC_MESSAGES local -i maxexports local -a msgs + + # vcs_comm is used internally for passing values among VCS_INFO_* functions. + # It is not part of the public API. + # + # hook_com, backend_misc, and user_data are public API; see zshcontrib(1) + # and Misc/vcs_info-examples. local -A vcs_comm hook_com backend_misc user_data LC_MESSAGES=C