From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 15012 invoked from network); 12 Mar 2020 18:49:54 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 12 Mar 2020 18:49:54 -0000 Received: (qmail 19861 invoked by alias); 12 Mar 2020 18:49:30 -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: 45546 Received: (qmail 17576 invoked by uid 1010); 12 Mar 2020 18:49:30 -0000 X-Qmail-Scanner-Diagnostics: from out3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25744. spamassassin: 3.4.2. Clear:RC:0(66.111.4.27):SA:0(-1.9/5.0):. Processed in 0.724828 secs); 12 Mar 2020 18:49:30 -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 66.111.4.27 as permitted sender) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddvhedguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke dttdertddtnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceouggrnhhivghlshhh segrphgrtghhvgdrohhrgheqnecukfhppeejledrudejiedrheelrdduhedvnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepuggrnhhivghlshhh segrphgrtghhvgdrohhrgh X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH 2/3] vcs_info git: In interactive rebases, properly support the full form of the "exec" verb. Date: Thu, 12 Mar 2020 18:48:52 +0000 Message-Id: <20200312184853.21654-2-danielsh@tarpaulin.shahaf.local2> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312184853.21654-1-danielsh@tarpaulin.shahaf.local2> References: <20200312184853.21654-1-danielsh@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmail-Scanner-2.11: added fake Content-Type header Content-Type: text/plain The code before this commit happened to have done the right thing: "exec" lines were handled by the catchall forward compatibility case, which happened to have had virtually the same effect as the correct case. However, that was merely an accidental result. This patch makes the code do the right thing deliberately, rather than by accident. --- Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index a8f49e24a..d8e5d1ff1 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -229,11 +229,11 @@ elif [[ -d "${gitdir}/rebase-merge" ]]; then p="${p%% *} ?" fi ;; - (x *) + ((x|exec) *) # The line is of the form 'exec foo bar baz' where 'foo bar # baz' is a shell command. There's no way to map _that_ to # "$hash $subject", but I hope this counts as making an effort. - p=${p/x /exec } + p=${p/#x /exec } ;; (*) # Forward compatibility with not-yet-existing 'git rebase -i' verbs.