From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16906 invoked by alias); 20 Nov 2016 01:43:52 -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: 39991 Received: (qmail 15409 invoked from network); 20 Nov 2016 01:43:52 -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(0.0/5.0):. Processed in 1.615495 secs); 20 Nov 2016 01:43:52 -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=0.0 required=5.0 tests=SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: genml+zsh-workers@thequod.de X-Qmail-Scanner-Mime-Attachments: |signature.asc| 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= content-type:content-type:in-reply-to:mime-version:user-agent :date:date:message-id:from:from:references:subject:subject :received:received; s=postfix2; t=1479606226; bh=pCDNQvNU7bS9QGn 38egdxJsC0wO0IJvHeMXOs5GlDIk=; b=po1hv7rivIAXeUqZVNZB6XTjAWXeX8z mrLez6wE2pFoi4/ubfTWEHhSNnCmt4DW/GPYAccqSUSKmm7nN6tLZYOjBezXTtAh QuW+Ipb+gR2Zjqj632p4+wvQLThY2VamtaJZbfUku21yJqmCPhlLfgCN6bBHI5Zu N2q5MxzIfkAc= Subject: Re: [PATCH] [RFC] Get subject of current patch in rebase-apply mode To: Zsh Hackers' List References: <20161120013325.12113-1-genml+zsh-workers@thequod.de> <20161120013325.12113-2-genml+zsh-workers@thequod.de> From: Daniel Hahler Message-ID: <7b8b1c0a-aa90-61bf-3967-a34ed35781d9@thequod.de> Date: Sun, 20 Nov 2016 02:43:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161120013325.12113-2-genml+zsh-workers@thequod.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R55NKN8I2jn3bPrCceW7O9ExOit1L0rJT" --R55NKN8I2jn3bPrCceW7O9ExOit1L0rJT Content-Type: multipart/mixed; boundary="e0kiQaoe5qpspjBfkEVCNeSpvVNBcddj5"; protected-headers="v1" From: Daniel Hahler To: Zsh Hackers' List Message-ID: <7b8b1c0a-aa90-61bf-3967-a34ed35781d9@thequod.de> Subject: Re: [PATCH] [RFC] Get subject of current patch in rebase-apply mode References: <20161120013325.12113-1-genml+zsh-workers@thequod.de> <20161120013325.12113-2-genml+zsh-workers@thequod.de> In-Reply-To: <20161120013325.12113-2-genml+zsh-workers@thequod.de> --e0kiQaoe5qpspjBfkEVCNeSpvVNBcddj5 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Please acknowledge that this patch is fine, before i) commit it. It works for me, but I am unsure about style etc. On 20.11.2016 02:33, Daniel Hahler wrote: > From: Daniel Hahler >=20 > --- > Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functi= ons/VCS_Info/Backends/VCS_INFO_get_data_git > index 18ba89a..93172fc 100644 > --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git > +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git > @@ -236,6 +236,15 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then > done > if [[ -f "${patchdir}/msg-clean" ]]; then > subject=3D"${$(< "${patchdir}/msg-clean")[(f)1]}" > + else > + local maxlines=3D10 > + while IFS=3D'\n' read -r; do > + if [[ "$REPLY" =3D=3D "Subject:"* ]]; then > + subject=3D${REPLY/(#s)Subject: /} > + break > + fi > + (( --maxlines )) || break > + done < "${patchdir}/$(printf "%04d" $cur)" > fi > if [[ -f "${patchdir}/original-commit" ]]; then > if [[ -n $subject ]]; then >=20 --e0kiQaoe5qpspjBfkEVCNeSpvVNBcddj5-- --R55NKN8I2jn3bPrCceW7O9ExOit1L0rJT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlgw/8sACgkQfAK/hT/mPgA/swCfV+sLcl0u2wTRdjvpw3a8xlg2 jPUAoP0Y/ie7yfESo3BXKYHGu+FPshM0 =u1nf -----END PGP SIGNATURE----- --R55NKN8I2jn3bPrCceW7O9ExOit1L0rJT--