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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26044 invoked from network); 8 Dec 2022 22:09:05 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Dec 2022 22:09:05 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1670537345; b=Zh8oJrjI2yIq3Uvh+9sqfk3xUxEU/F+GE7d+ggo9kds6qxcVh6Dcfcx4YENNVVv4cIDRGVrB6u vKuYhbhOY3xVoVRNnr7dZg2PN5bV53P1Psne1YKVDiuxbIIMn4vAPnOWQnc5GVU2rdZvx8WALJ CjrIdB9h6C7D5SygSyMuPhFfwDPel9RvxkIN3ufHBQuWAT43UNzvnnnvGPsJuSub0Z0ajOqaKm Bcnq59zS1/PG4j/1WbWROk7fRDQ8rIWA30BhTK1Q9UqvE+7qY0sBjnYzqJ66ORvKrqBdNq/7BW NRpngfcvKZ/9PSyn7b9DVtiIEbCLXvlsU4ubuTYWVAy1FQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout5-smtp.messagingengine.com) smtp.remote-ip=64.147.123.21; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 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=1670537345; bh=8hMTXCROcIsc/86H1K9Ys/HjARckzNL7d1A4kGu9+Vs=; 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:Cc:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=KyxEn7HLhHJeqDz3GPduMJx09XI700MgCeXxsfMh3g/ap2eXOJyKJSB41nYK6kKunGY0Q0ZyqG inJH2WhOWNkExmtFsrCoCZt5ScKuq5rFPLU2cHsz1zOyFbybVCTTq90HlB6+51KS+jHFlZyKO+ RGvxjE5cLYjy83+jliX3VVWuT9138IfzFViRDvP+ijxMsQa9XC1ew4J15hQMdZFrtsh8wTxBvP ysaBsk5/AhgrwTTRXggqGfqCvjVcNmJ5e1Ne7Asgq8bNIsfd1ASZtIsw5DkHpNbwTvsUvUBt9P kLf5jTDNXGLUMY9/tRn5NpSUqkBFhCu0YO84b7yn2ffF4A==; 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:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=6hkih4TniC7F3O93zPxzyCSUMnegSEToo/dW0jJlx6g=; b=TN0DlNjXxyyLPtIdbrR8ZFrHvm OtXCgwNs/7KE4MYnxpCBhnKJNEUCApl0qVN9MjNGzpuLEvjSL/P+wtLpxaACsm7g8SisJ+JpgrUBe ezWJWf4/KSXd96SA9bngw7L/+YNw8rjgDec3681Z2sjvGdo9cU4Axeu8ir/lBvxqEwFvUsV89YIQZ hspcwDuOw10I27Cw+BrxEwo8FwjoLihrt38rKcz/nYIyb4Hd9XwtHdoDOTPo13U1keh6iXbpwu+j4 +nkO56j+vO6rKMWW4LMhnEQrIk5KHlhxmBE7FDJJ2oFbZgz2M29WR3YXT/D/XbvbkPsl/crpog2GC 6pbiMj0A==; Received: by zero.zsh.org with local id 1p3P4j-0004Vq-H3; Thu, 08 Dec 2022 22:09:05 +0000 Authentication-Results: zsh.org; iprev=pass (wout5-smtp.messagingengine.com) smtp.remote-ip=64.147.123.21; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:37021) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1p3P4S-0004CG-F1; Thu, 08 Dec 2022 22:08:49 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 9F00A3200914; Thu, 8 Dec 2022 17:08:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 08 Dec 2022 17:08:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc: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=fm1; t=1670537326; x=1670623726; bh=6hkih4TniC 7F3O93zPxzyCSUMnegSEToo/dW0jJlx6g=; b=eupXu5bIf+CyaBCv+Ss9hgGhsq nHJfVuvJxDlkfxnTyEfRV1iUPZstK/s+nbIrK3W9sozfggKL7D40nIju3ZlnUvoM /Ke+ZGBy6DS6O6BoneiIYX5hlWhUTKBpYaOlffFsT+wF5AHYdgM0L3lcSzg4OrTJ Mfpewpkf5M0FSO7q1wNRDNFXXXWGTqgFfXHPczgoAu010VIB5waKHb/CH1qJo3Oq VrCJSmTnXlqahes514yqG0ApH7/4a3bKqpoKJaxbKGTythQ8w+Q9NYb5hkZc8uCq +48VsTtGDM+KMIdRMoJ+iCDmPL3ICRbqTIzJzJsEh9wvu8BndycdkZePfAOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id: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=fm2; t=1670537326; x= 1670623726; bh=6hkih4TniC7F3O93zPxzyCSUMnegSEToo/dW0jJlx6g=; b=E FxCzXLxAlR772xamQIUeTSEolF4odDv0DS7GJMfXQDQaLoTm8O9M3HFpOZrefbPv 4EudNRiDKjG7o4O4W4rU5Biyw6+nHQPfcswBomTuMdHdARO3Bt7bOLtW/G45OyCb wyVtVX0tq5KSzHAuM2R/IFKmJ8CwwTzstfWXi4HudpyG1G5agfkOqJE9ostuZozs OaBnvA1LyWSQKkixJW1z3w2lfPQ0dm/WNksW5nLBoD8JZHEQoUw3jL3N+sY8SLHP ac/njburmz6lxoeFbdob6yud0abvvaF6nQERrFu0ixIvGqJWZOQal17fMVXsQy/s cRN+wMlQjaR0tbK20htrg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddtgdduiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjfgesthektddttderudenucfhrhhomhepffgr nhhivghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg eqnecuggftrfgrthhtvghrnhepfefhieeutdehgfetudefveeitdegtdejkefgvddugffg tdduheeggfejudetfeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Dec 2022 17:08:45 -0500 (EST) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4NSpFh0yzFz45W; Thu, 8 Dec 2022 22:08:40 +0000 (UTC) Date: Thu, 8 Dec 2022 22:08:40 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Cc: Peter Grayson Subject: [PATCH] vcs_info git: Check the get-unapplied style as documented (was: [PATCH v3] Updated StGit patch detection in vcs_info) Message-ID: <20221208220840.GT27622@tarpaulin.shahaf.local2> References: <20221116204501.921232-1-pete@jpgrayson.net> <20221208145241.494978-1-pete@jpgrayson.net> <20221208220640.GS27622@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: <20221208220640.GS27622@tarpaulin.shahaf.local2> User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 51142 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: The style was treated as "always true" rather than as "settable, false by default" in the rebase-merge and cherry-pick cases. This affects the gen-unapplied-string hook, and may also affect gen-applied-string and set-patch-format hooks if they accessed VCS_INFO_get_data_git's internal parameters directly. If this affects you, just set the style in your zshrc: . zstyle ':vcs_info:git*:*:*' get-unapplied true --- Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) Daniel Shahaf wrote on Thu, Dec 08, 2022 at 22:06:40 +0000: > Noticed two issues while there: > > 1. (preëxisting) Some of the other codepaths don't check the > get-unapplied style. I'll send a patch for that in a minute. diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 23d4d31a1..37cd048db 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -244,7 +244,9 @@ if [[ -d "${gitdir}/rebase-merge" ]]; then (( $+REPLY )) && git_patches_applied+=( "$REPLY" ) done fi - if [[ -f "${patchdir}/git-rebase-todo" ]] ; then + if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-unapplied && + [[ -f "${patchdir}/git-rebase-todo" ]] + then for p in ${(f)"$(< "${patchdir}/git-rebase-todo")"}; do VCS_INFO_git_map_rebase_line_to_hash_and_subject "$p" (( $+REPLY )) && git_patches_unapplied+=( "$REPLY" ) @@ -374,7 +376,9 @@ elif [[ -f "${gitdir}/CHERRY_PICK_HEAD" ]]; then # TODO: maybe read up to the first blank line IFS='' read -r subject < "${gitdir}/MERGE_MSG" git_patches_applied=( "$(<${gitdir}/CHERRY_PICK_HEAD) ${subject}" ) - if [[ -f "${gitdir}/sequencer/todo" ]]; then + if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-unapplied && + [[ -f "${gitdir}/sequencer/todo" ]] + then # Get the next patches, and remove the one that's in CHERRY_PICK_HEAD. git_patches_unapplied=( ${${(M)${(f)"$(<"${gitdir}/sequencer/todo")"}:#pick *}#pick } ) git_patches_unapplied[1]=()