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 4588 invoked from network); 28 Mar 2020 03:41:49 -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; 28 Mar 2020 03:41:49 -0000 Received: (qmail 27608 invoked by alias); 28 Mar 2020 03:41:36 -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: 45644 Received: (qmail 24747 invoked by uid 1010); 28 Mar 2020 03:41:36 -0000 X-Qmail-Scanner-Diagnostics: from wout1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25758. spamassassin: 3.4.2. Clear:RC:0(64.147.123.24):SA:0(-2.6/5.0):. Processed in 5.413247 secs); 28 Mar 2020 03:41:36 -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) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeitddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgogfeguddtqddvjeculdegtddmnecujfgurhephf fvufffkffoggfgsedtkedttdertddtnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghf uceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfkphepjeelrdduje eirdduvdehrddvfedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] vcs_info git: Fix current patch's name in several cases. Date: Sat, 28 Mar 2020 03:40:52 +0000 Message-Id: <20200328034052.21353-1-danielsh@tarpaulin.shahaf.local2> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmail-Scanner-2.11: added fake Content-Type header Content-Type: text/plain --- Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 2b2040c94..79429c8e0 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -292,9 +292,24 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then # Set $subject to the info for the current patch if [[ -f "${patchdir}/msg-clean" ]]; then subject="${$(< "${patchdir}/msg-clean")[(f)1]}" + elif [[ -f "${patchdir}/final-commit" ]]; then + # This value is not rfc2047-encoded. It's also available via + # "${patchdir}/info". + subject="${$(< "${patchdir}/final-commit")[(f)1]}" elif printf -v this_patch_file "%s/%04d" "${patchdir}" "${cur}" [[ -f $this_patch_file ]] then + # This branch is last for several reasons: + # + # - The "Subject" header will be MIME-encoded (rfc2047). + # + # - If the mail has full rfc822 headers (including "Received" and + # so on), we won't find the "Subject:" header, since + # VCS_INFO_patch2subject only checks the first few lines. + # + # - In --scissors mode, we may find the outer "Subject:" header, + # whereas the inner one (after the scissors line) will be used, + # if present. () { local REPLY VCS_INFO_patch2subject "${this_patch_file}"