Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] [RFC] Get subject of current patch in rebase-apply mode
- X-seq: zsh-workers 39991
- From: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] [RFC] Get subject of current patch in rebase-apply mode
- Date: Sun, 20 Nov 2016 02:43:39 +0100
- 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=
- In-reply-to: <20161120013325.12113-2-genml+zsh-workers@thequod.de>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20161120013325.12113-1-genml+zsh-workers@thequod.de> <20161120013325.12113-2-genml+zsh-workers@thequod.de>
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
>
> ---
> Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/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="${$(< "${patchdir}/msg-clean")[(f)1]}"
> + else
> + local maxlines=10
> + while IFS='\n' read -r; do
> + if [[ "$REPLY" == "Subject:"* ]]; then
> + subject=${REPLY/(#s)Subject: /}
> + break
> + fi
> + (( --maxlines )) || break
> + done < "${patchdir}/$(printf "%04d" $cur)"
> fi
> if [[ -f "${patchdir}/original-commit" ]]; then
> if [[ -n $subject ]]; then
>
Attachment:
signature.asc
Description: OpenPGP digital signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author