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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 ce1622cd for ; Mon, 25 Nov 2019 08:17:55 +0000 (UTC) Received: (qmail 6122 invoked by alias); 25 Nov 2019 08:17:50 -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: 44930 Received: (qmail 4438 invoked by uid 1010); 25 Nov 2019 08:17:50 -0000 X-Qmail-Scanner-Diagnostics: from wout4-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.20):SA:0(-2.6/5.0):. Processed in 5.217821 secs); 25 Nov 2019 08:17:50 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:cc:subject:content-type :content-transfer-encoding; s=fm1; bh=b9H3zttzZ+UT8KJG9UPRtVrPv8 9zzX2GPqqsoxsZ8tA=; b=snSYMY9a7XrMMMNgsEj5zjPinQCARk6B4KInuRcPZH VOOFKSUa6t0owpyswi4U3j2BzzQVrycBqBJ9dIqjX1dOQ4XfKHpEK6UG1WWcvDVS vEQiQVxkz/55TnR6ahuMciCBn2fHWs/0pOn9WQj9urqWEbt4ogTdKAdMTzS+PTwl 8zszCUCMRDUfHsaEteiFojK/67hU7JFvsz7tbn5PJ1IkERDDmzj7NjMNRjMiYKtc oG9cKQpUqaoRZXNdJaJ7+WTIYNZ7W8J/AldxtWGrFAORFPWhOOGtvMeqGkC883Ue ri5uGGXLeF504wh9swqpWzZ+mSHJu5nAoQloUosGnPnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=b9H3zttzZ+UT8KJG9UPRtVrPv89zzX2GPqqsoxsZ8 tA=; b=PY+NJkUiOLy9253EV5ZomyO0ZWG961BVqwb+Is1S3SyNUpseQaAQ/MXoQ djV+l3I36powyCKGRz/TiWdKioNbt4IB/ppcZim1mesJ/LfujiV4pPMfcZtkBI+9 9WzAQCojasrEzL+8P60BLJTiBzSMDiF5Ee839t13bWOHl89GqD9Z5dpi5JnBxhVC EjFl/mZeypOiDTiYU6wkXtJI9UmHIzcXOqBCS8QCSk/1c8eKcr2wked5Dr5eWloY UuXFf3McBlgCCgIQJZJcrEhf+6FuBYF+leU/5ETXNbiGx3uzzvBTt96PV9P5WG8C reJ/b5nY8eTG5Od6IXaPqGxAx/A5A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudeitddgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfffgr nhhivghlucfuhhgrhhgrfhdfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmh gvqeenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgr fhdrnhgrmhgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-578-g826f590-fmstable-20191119v1 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20191123221443.279556-1-mezin.alexander@gmail.com> <20191123221443.279556-3-mezin.alexander@gmail.com> <20191125043525.lcxm532gi6hb7n53@tarpaulin.shahaf.local2> Date: Mon, 25 Nov 2019 08:16:45 +0000 From: "Daniel Shahaf" To: "Aleksandr Mezin" Cc: zsh-workers@zsh.org Subject: =?UTF-8?Q?Re:_[PATCH_2/3]_vcs=5Finfo/cvs:_set_vcs=5Fcomm[basedir]_in_VCS?= =?UTF-8?Q?=5FINFO=5Fdetect=5Fcvs?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Aleksandr Mezin wrote on Mon, 25 Nov 2019 07:31 +00:00: > On Mon, Nov 25, 2019 at 10:35 AM Daniel Shahaf wrote: > > > > Aleksandr Mezin wrote on Sun, Nov 24, 2019 at 04:14:42 +0600: > > > +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs > > > @@ -5,11 +5,7 @@ > > > -cvsbase=3D"." > > > -while [[ -d "${cvsbase}/../CVS" ]]; do > > > - cvsbase=3D"${cvsbase}/.." > > > -done > > > +++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_cvs > > > @@ -7,5 +7,12 @@ setopt localoptions NO_shwordsplit > > > +local cvsbase=3D"." > > > +while [[ -d "${cvsbase}/../CVS" ]]; do > > > + cvsbase=3D"${cvsbase}/.." > > > +done > > > > I know you just moved this code around, but I'd like to point out th= at it > > causes an infinite loop when /CVS exists. >=20 > Also I probably shouldn't have moved the code in the first place. If > the current directory has `CVS/Repository` in it, it means that the > directory is controlled by CVS, and maybe we shouldn't consider .git > from the parent directory (even when the parent directory also has > `CVS/Repository` in it). Though it's questionable. >=20 > Example: > ~/cvs-dir/CVS/Repository > ~/cvs-dir/git-repo/.git > ~/cvs-dir/git-repo/CVS/Repository > ~/cvs-dir/git-repo/cvs-subdir/CVS/Repository >=20 > I'm not sure what vcs_info should output for ~/cvs-dir/git-repo/cvs-su= bdir/ How about showing the information from the worktree whose root is deeper= (=3D closer to cwd)? Users can show the information for the other workt= ree by setting the 'enable' style in a :vcs_info:foo:* context and calling =C2=ABvcs_info foo=C2=BB. I see two possible problems: One, the workaround isn't sufficient when the two worktrees are of the same VCS (for example, git and git, as opposed to git and CVS) =E2=80=94= that is, when foo/.$vcs and foo/bar/.$vcs both exist as separate, nested worktrees. However, this use-case isn't well-supported by all VCS's. For example, which worktree =C2=ABcd foo && $vcs add bar/baz=C2=BB= will take effect in is anyone's guess. Two, as I pointed out in reply to an offlist response, the existence of $GIT_DIR and $GIT_WORK_TREE means that the two VCS's basedirs need not be in a parent dir =E2=80=93 subdir relationship with each other; they c= an be /foo/bar and /foo/baz. At that point, we won't be able to use worktree root paths as discriminators. Re-reading PEP 20, I think "Information w= ill be shown for whichever VCS is listed first in the 'enable' style" might be = a sensible design=E2=80=A6 but it's a puzzler. Cheers, Daniel