From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24514 invoked from network); 17 Apr 2022 18:48:39 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Apr 2022 18:48:39 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1650221319; b=nIfbcaI5oz2SI3G9eYgx7kdAFecLvlAvM6rbgP7o0V6dHMgctfn8MztJjWBCyGa0BkanUNMFqJ +UNBvYHU+CN7KTNWHocvQicUifAJLJO86DYhQhEh72tE74V+/fw0ryiy8LjPUT+zgKwc1QVb3P viZgKyLRYe38NuiDFDoppJZ3AKE20OPbtfoD1CsJKyvIWEpdx4UBbNovHjv26bPdAFBF9ssx1M nK3eXIrL5mm0mZU2gLbsGbtGPUy5P0ZWAozJLk5IiDbTk63E2/Ib6OsKlzIs4IZ2lAw0MFcIUj MIHdhnKhD7qwkelgpeyoD/SzvtbPjFNZH9PEeL5ygQ40Hg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout4-smtp.messagingengine.com) smtp.remote-ip=64.147.123.20; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1650221319; bh=DWJWLeIQNnCPV/Ey78CgTttDDHBrxYmMNaoyzVOCIlw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=Ppr0xWCWwwA47xk2tlibRuQn2aFUS5oB/cAex40ufgo2ifRX91awHj8NgEIpGoWlNRaT58mkrT KV1UPkWiR3dmTSPamUQdTfQYkl3f/jilHjlzcX+eCmEk4RK1UD6T1oGRQVSyrduE2oGea58UyM WbXThrWbaY+4EXFuFswoMB10N6fUl7sf60UHnXsSXxqm6+g9/42NxyOrRgdtVgZARm/gZJGqs/ ATZHzJ33lMIgSy+71/DYN6NCcBVdYMxenqjITeqeI9vdo/k7Mp8lOOWfAIiwkbBAu7OSck6ZZN XxNfQ955VszKxLlzusfgXlrxnPeTTiaBR+7p3HX/CqGATQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=HW9XXMyvLpVLyDOBQcVAR3Y1ozyGrzOdB0aH85yYfjk=; b=GjS21H348hYV+N28Tjo7iyDyJo bQEmaUk9b3GoWJhoQGbfQuU8kGIayKMYChnAbB0jGf+mKTRVvOHj6UMXgkcY4jYz7LF4UHoQHLDlB KFX539o+M0ct6XloH4j0UfxJlY3WIUuT3sq5JP//Cr7nApLPP+Vu2KnA81M2PtHvdRjJpX9wSzL9j 9lbcPBl5Vcg2ZF85g+gyKDWn8KqyuZx++Hr6ScDim420V918mhsS7ORaGYKF4pnEruyiTtu3rRJzy XSreWLYKcyUsxBQWjxMyFGPOd0fwbWP0XAZ9X+sMGqmeG+lUJcXuK7M0O4KFAYD/2qSdxK4SlJo81 dsgC4oNQ==; Received: from authenticated user by zero.zsh.org with local id 1ng9wt-000LGk-9p; Sun, 17 Apr 2022 18:48:39 +0000 Authentication-Results: zsh.org; iprev=pass (wout4-smtp.messagingengine.com) smtp.remote-ip=64.147.123.20; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:50907) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1ng9wb-000Kv6-KB; Sun, 17 Apr 2022 18:48:22 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id F0BCE3200EF5; Sun, 17 Apr 2022 14:48:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 17 Apr 2022 14:48:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm3; t=1650221299; x=1650307699; bh=HW9XXMyvLpVLyDOBQcVAR3Y1o zyGrzOdB0aH85yYfjk=; b=cXLbrDwWjTlZhrro2FVqBA6kpgcL0Q3amTonGbN9b I7vEdTu/a4j7zdngKyM31dhZ69XtYtS0I9FA9aECSkLehwDU931G10HgcvXzGPoB oELnV8Myl4R0/jbEFWxxt9FIJPzJIrARr/e6LI88Lvt7EJtNK0qt1ywVZHRR232K 91m3AWvIg4X7nVldw0y36v+qi++K3ydNvSN8rdi81t8PBFehkZ1yaNu42mPNBH1j WdwTk+fWXH95SGoUvKXtGCB68AQ5JqloxPZMpGdMjarDpIpZujjCOND2GtDar3ka venTbe2DQJ+br8WBVoNdBXcVcmVcf0OPQDnvnV/G4AxOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1650221299; x=1650307699; bh=HW9XXMyvLpVLyDOBQcVAR3Y1ozyG rzOdB0aH85yYfjk=; b=efoR4bNAcdl6SJORHikoNdzQxQ8rnqgs/NeBuwO+qxL3 19Rf2mQB/v4U0Fs99ICsLZ84HP/SwOCorpXfzpVeGY1Axx+N7ww/780FAet+HKXK iQD4GmUa4Cwvx5WTMFgxcEFCiZDJWXfBrmn9Npp4gox3qQQU95i1wYvriJcc8qX9 NXWJPcjDNJGK9uD08yENgNRMyR1aSRq836jDPNf6/QfMk/0NWEutHAuLfXfmJB4y 8ZEtntPIAAItN6WVqxkL7yCX3GwXl3U+6aML3a/Lpz0LRQNViTNYFErwaM3PqmNq q2zbNbNfLwvOlUxwfpuVshnJyLGufx4ENw56e7qC1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelledgudefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtugfgjggfse htkedttddtredunecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefgleehtdffue fhgeeuleefffejgedttdelhedvvdeuiefhvefgvdfghfevvdekteenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrsh hhrghhrghfrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 17 Apr 2022 14:48:19 -0400 (EDT) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4KhJww4YjRz1th; Sun, 17 Apr 2022 18:48:16 +0000 (UTC) Date: Sun, 17 Apr 2022 18:48:16 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: Boundary error in VCS_INFO_set --nvcs Message-ID: <20220417184816.GA14929@tarpaulin.shahaf.local2> References: <20220417180423.GQ27526@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220417180423.GQ27526@tarpaulin.shahaf.local2> User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 50075 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Daniel Shahaf wrote on Sun, Apr 17, 2022 at 18:04:23 +0000: > Bart Schaefer wrote on Wed, Apr 13, 2022 at 14:34:28 -0700: > > This output is from an older version of VCS_INFO but I don't see a > > diff that would have changed anything but line numbers: > > > > +vcs_info:52> VCS_INFO_set --nvcs > > +VCS_INFO_set:5> setopt localoptions noksharrays NO_shwordsplit > > +VCS_INFO_set:6> local -i i j > > +VCS_INFO_set:8> [[ --nvcs == --nvcs ]] > > +VCS_INFO_set:9> [[ '' == -preinit- ]] > > +VCS_INFO_set:10> i=0 > > +VCS_INFO_set:11> typeset -gx 'vcs_info_msg_0_=' > > +VCS_INFO_set:10> i=-1 > > +VCS_INFO_set:11> typeset -gx 'vcs_info_msg_-1_=' > > VCS_INFO_set:typeset:11: not valid in this context: vcs_info_msg_-1_ > > > > The problem is that when disable-patterns matches the current > > directory, vcs_info invokes VCS_INFO_set --nvcs, which hits this loop: > > > > if [[ $1 == '--nvcs' ]] ; then > > [[ $2 == '-preinit-' ]] && (( maxexports == 0 )) && (( maxexports = 1 )) > > for i in {0..$((maxexports - 1))} ; do > > > > Because $2 is not "-preeinit-", when maxexports is zero it is never > > reset to 1 and the "for" loop runs backwards to -1. I don't otherwise > > know how to reproduce the situation where VCS_INFO_maxexports is never > > called. > > Can't reproduce. What's $ZSH_PATCHLEVEL? Could you try in 'zsh -f' in > a new directory (create a new repository therein)? Found a(nother?) way. In current HEAD and 'zsh -f', call vcs_info once, _then_ set «zstyle ':vcs_info:*' enable none», and the error will happen via the following callsite: 96 if [[ -n ${(M)enabled:#(#i)none} ]] ; then 97 [[ -n ${vcs_info_msg_0_} ]] && VCS_INFO_set --nvcs 98 return 0 99 fi The documentation of the «nvcsformats» style makes it clear that in the "no VCS" case vcs_info_msg_0_ should still get set. I'm not sure, however, what the right code change is. Anyone wants to jump in? This is not a regression, and as such not a blocker. Cheers, Daniel