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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10191 invoked from network); 26 Oct 2020 20:59:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Oct 2020 20:59:10 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1603745950; b=clqnU/dVgJ4dKD1FvF8Ujy8jQ2350/zHdKvpSDNTjYW5oNRoI5WS0h1OYVAY5cOR6GE6u7guZI jXOhTJLj/M0Mn2/dAVoYZtb6gkh17c3EXm5JFXkwE6M+2A4cjUDZK3huxHrUYJb9vObZKp1GYE x4vqxB6fOFuvqkO6rspeFk7FtAg11R+Ys5pgAsLdVxaDeMsU4vsC7YEEeBjRe2Nl2dsS3azEZj vxFo5GY9EggV0DEcmj3DsnHce0uxgzt6b2tCXjfJD8Ojay4pb9QsCKP/sPepxFdKIorcsp+bsO Yi+3DeWP5szI3jmMl4RVhz9bZneEnh3//JtxY1V+q2VVDw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout1-smtp.messagingengine.com) smtp.remote-ip=64.147.123.24; dkim=pass header.d=daniel.shahaf.name header.s=fm1 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-20200801; t=1603745950; bh=Gzk8mS/07Ta5hjg8mQSMxtHkA6xQ6UVW9g228KTs4jA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:To:From:Date: References:In-Reply-To:Message-ID:MIME-Version:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=nlQvMsz4fG8f9Aalx1fWBVg1jLjUfL1rn/xJ0k4Y5P6DAlfC2L98hF1z4wD36BJG6AGM+voQ5i 6AdRbqk/+TCBDHYOiB5bRY0Kxy9kvaBfezYhBsy8/grLeeC9xV/T+Omm8o6fey8APEk41eqINe 850SBHAWfK0O85WwF2XsMEdNInq/87bY68kCWuAmk+tyXflCWpimxMfq9mub6mtFa4Spg5ODJd 8Ctob0KOLYWAJe4w/cc7iRzNpw2ywBDYpOn+QAEu45LY/f/4mXyWHXcKWNdcyK29sFzCw7NxJD Pj7rsHGXNEVPtMKR/Q72aN1uRddYcby0gddLOxPgEJqOfQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Subject:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=7jzw5Xojkp1JS45Aj8kvsCLG2zE4F1CAJ09HxvZsfM0=; b=f8EKewk5hnLijmO7cHVZduTWKl n52+dQhb1sqELgJDTbdQFTN8Mh0MCSJ96JHmxWnZBYcNE+HnSt4tNne82ic2v+yJVMZXkKr3DFMSi EjQpiqHSzuSZPtRv6R+bdeYZ3B4p1XHiQnhMuwjfjsAvblxB6kYcqUCRt7a/p51GA0SMsEWspEVkP 1VWI5KjIYKsK0yajeI5Na5riApwzYZwZyxegH9ZJgKWL/QRXlT0tjWKfkVgLxcPFwdXe2b19DpM2/ hCtz1CwFPI1/p90JeZtSO7aURMiRwc9Y1PbZrVqkQWO3ofsp94zpeda+d3znVG1npcfB2TcOQxC8g pS1vaicw==; Received: from authenticated user by zero.zsh.org with local id 1kX9a4-000PTq-Qy; Mon, 26 Oct 2020 20:59:04 +0000 Authentication-Results: zsh.org; iprev=pass (wout1-smtp.messagingengine.com) smtp.remote-ip=64.147.123.24; dkim=pass header.d=daniel.shahaf.name header.s=fm1 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 wout1-smtp.messagingengine.com ([64.147.123.24]:45097) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1kX9Zp-000PKq-0k; Mon, 26 Oct 2020 20:58:51 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 64251BEC; Mon, 26 Oct 2020 16:58:46 -0400 (EDT) Received: from imap22 ([10.202.2.72]) by compute3.internal (MEProxy); Mon, 26 Oct 2020 16:58:46 -0400 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:subject:content-type :content-transfer-encoding; s=fm1; bh=7jzw5Xojkp1JS45Aj8kvsCLG2z E4F1CAJ09HxvZsfM0=; b=BCADAn83oQqvo7qz5WEBKFoNIHdNLcuMh35/QBCd6l uHDW9Gs2wQPkedoJPaWuyE14DvDwMzV3aET/XRd7/QCFxEboY8k7ZGgGDngGZwVM +tdDYSMw62KmdZJsoOrgj2UqDK9LFmmlGbqDiVNHkabbeBryHx9z/kcZaNeBUZH8 2uZw26L51qf7XsKZN9kVg7quQqu/Z0JOLM6MZfBIAEUG03GaAyiKYCJ1rxl24ikZ PrIBDE2lIwM9l2YuBcKI8SIHdIQqY0JfFlP20b1lzMhDTJYlHWkHK8jPoPnvF1bj gBQYm+1BSwQX+0wMZSglLFpPmg6Z+vxRv1IzMpLl1OGg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=7jzw5Xojkp1JS45Aj8kvsCLG2zE4F1CAJ09HxvZsf M0=; b=hS2sZFK5rgTHosD8RBn+fsDAwGMnB5V2qRrx7OAAhlQE26E0V0NhtGd0b Rzx+TU+1GtYt9/m4KkkHAICea59y4cHtLE00c6p+5U9fJiXmb47wdDpv20+5QTcu oYeTwWSmRdEC4D1nU2MS3yFmhph7LcFrJDBoapGBD0p95TwTzYoU8NsSKGaRHGLD JVXh14i7+NCCUR0/nrqsYRbKMm4azY0V0d4ueYpP5hl/r6AFNtCDNHE8V2esvH0G DourxSNJc0U42lPHbY3XD6agBSXliwdNMw4bxKbqG12WK+7CQO0bjYHXqJxS+/1n diFuD6BqJ11dsAtLSOgxxO2gyGokg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeejgddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfffgr nhhivghlucfuhhgrhhgrfhdfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmh gvqeenucggtffrrghtthgvrhhnpeefhfekfeevieelleehiefftdekudejledvhfdtjedt geegvdeuffefleehhfdvgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9C8B0668007A; Mon, 26 Oct 2020 16:58:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-529-g69105b1-fm-20201021.003-g69105b13 Mime-Version: 1.0 Message-Id: <56643e6c-0f7c-49f0-8089-4d4a42008dae@www.fastmail.com> In-Reply-To: <878sbtlx0o.fsf@ft.bewatermyfriend.org> References: <20201023083444.1565608-1-mezin.alexander@gmail.com> <20201023234855.5a0c6290@tarpaulin.shahaf.local2> <87mu0clbw2.fsf@ft.bewatermyfriend.org> <37168-1603506679.130606@RR8o.26Eg.GGvC> <20201025195401.3c54c6a2@tarpaulin.shahaf.local2> <878sbtlx0o.fsf@ft.bewatermyfriend.org> Date: Mon, 26 Oct 2020 20:58:25 +0000 From: "Daniel Shahaf" To: "Frank Terbeck" , zsh-workers@zsh.org Subject: Re: [PATCH] vcs_info: add 'find-deepest' zstyle Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 47505 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: Archived-At: Frank Terbeck wrote on Sun, 25 Oct 2020 23:13 +00:00: > Heya, >=20 > Daniel Shahaf wrote: > > Oliver Kiddle wrote on Sat, 24 Oct 2020 04:31 +0200: > [=E2=80=A6] > >> I don't have much use for nested repositories but vcs_info tends to= be > >> more use with git than subversion. > > > > +1, primarily because git is much more stateful (e.g., interrupted > > rebases). >=20 > I think it's mostly because git is a decentralised system, where more > information is available without having to touch a networked system, > like the central server in centralised systems. The latter will kill > latency dependant use cases, such as prompts. I don't see how vcs_info's admittedly increased usefulness under Git follows from Git's being decentralized and from more information being available locally. Decentralization is reflected in, for instance, the data model (a DAG of= commits) and in the existence of the =C2=ABgit push $remote=C2=BB syntax= . Neither of those is directly reflected in information typically extracted into prompts: for instance, when the checked out branch tracks a remote branch, vcs_info doesn't have a built-in facility for displaying the name of the remote. Same goes for having the history available locally. vcs_info git prompts do not typically show information from commits other than the current one. The only exceptions I can think of are the detached HEAD %= b expando fallback code that uses `git describe`/`git name-rev` and the statistics expandos in the patch-format style. If showing previous commits' data were a common requirement, one would have expected the use-server style to be used by at least some of the centralized backends. However, that style is used only by the p4 backend for detection (as opposed to interrogation) and by the 'checkout' variant of the bzr backend. On the other hand, consider =C2=ABgit rebase -i=C2=BB which I cited as a= n example. There is no conceptual problem with implementing the equivalent of that feature in Subversion=C2=A0=E2=80=94 and if that were done, showing stat= e in the prompt would become much more useful under that backend. Furthermore, under Subversion I use hooks to display some additional information I find useful: a list of changelist names and the modified/switched/partial-depth indications from `svnversion` output. None of these states is inherent to Subversion's centralized nature: there's nothing stopping git and hg from implementing the equivalents of =C2=ABsvn changelist=C2=BB, =C2=ABsvn switch=C2=BB and =C2= =ABsvn update --set-depth=3Dexclude=C2=BB. (To be clear, I'm not saying they should. = I'm just saying those features are orthogonal to centralization/decentraliza= tion.) And the reason all this is so? vcs_info shows the _current_ state, which is a moving target. It doesn't show the history, and doesn't need= to, because the history is in the user's mental cache anyway. That's also why the git-rev-list(1) uses in Misc/vcs_info-examples print the statistics of the local HEAD relative to the upstream HEAD, but not the statistics of the upstream HEAD relative to an empty repository. Cheers, Daniel P.S. Speaking of my hooks, I've got some other ones that might be of independent interest: I have my svn prompts show the `svnversion` output's revision range, e.g., "42:100", rather than just whatever `svn info --show-item=3Drevision ./` happens to be; I print the topmost patch= in quilt addon mode, and the commit being rebased in interrupted rebases; and I indicate presence of GIT_* envvars and per-repository addons (e.g., git-annex(1), vcsh(1)).