From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5335 invoked by alias); 28 Nov 2016 23:01:57 -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: X-Seq: 40029 Received: (qmail 19434 invoked from network); 28 Nov 2016 23:01:57 -0000 X-Qmail-Scanner-Diagnostics: from hahler.de by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(188.40.33.212):SA:0(-2.9/5.0):. Processed in 1.115309 secs); 28 Nov 2016 23:01:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: daniel@hahler.de X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.hahler.de designates 188.40.33.212 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=postfix2; t= 1480373772; bh=xBCkWLx1/U/E/eAIK7I/ATnZn61xzd1NvFIfncweieU=; b=n y/5ZtBhX+aem4lK14ePpWoATAXSsJRzMZE99e8A+5AFDtq1vtMqwIjPUz+Pletf9 hbNQlIIcIKaZ/wmGu79cljHqUsngjWiuSr5TfW30FjdAaRMjQ6zI7aUCEue/hZMK 92MP0csh3XR2hzgYPmC/TZleN++htekHbByEJBM9Ko= From: Daniel Hahler To: zsh-workers@zsh.org Subject: [PATCH] fixup! [RFC] Get subject of current patch in rebase-apply mode Date: Mon, 28 Nov 2016 23:56:06 +0100 Message-Id: <20161128225606.22536-1-genml+zsh-workers@thequod.de> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161120013325.12113-2-genml+zsh-workers@thequod.de> References: <20161120013325.12113-2-genml+zsh-workers@thequod.de> From: Daniel Hahler --- Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 93172fc..1560d7f 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -236,15 +236,15 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then done if [[ -f "${patchdir}/msg-clean" ]]; then subject="${$(< "${patchdir}/msg-clean")[(f)1]}" - else - local maxlines=10 - while IFS='\n' read -r; do - if [[ "$REPLY" == "Subject:"* ]]; then - subject=${REPLY/(#s)Subject: /} + elif [[ -f "${patchdir}/${(l:4::0:)cur}" ]]; then + local maxlines=10 line + while IFS= read -r line; do + if [[ "$line" == "Subject:"* ]]; then + subject=${line/(#s)Subject: /} break fi (( --maxlines )) || break - done < "${patchdir}/$(printf "%04d" $cur)" + done < "${patchdir}/${(l:4::0:)cur}" fi if [[ -f "${patchdir}/original-commit" ]]; then if [[ -n $subject ]]; then -- 2.10.2