Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 2/2] vcs_info quilt: Pass patch subject lines to gen-applied-string
- X-seq: zsh-workers 36913
 
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
 
- To: zsh-workers@xxxxxxx
 
- Subject: [PATCH 2/2] vcs_info quilt: Pass patch subject lines to gen-applied-string
 
- Date: Thu, 22 Oct 2015 12:30:57 +0000
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	daniel.shahaf.name; h=content-type:date:from:message-id	:mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Ei3	pwJz1DszalCS6pA6J3t3cEBU=; b=nfk854A/Kfjl/veMpRGFBKIZrKWszIR3Vxm	wGDY7K6J3T5/gaur4LhdmGNqo8pAtoi+i4poMe9mbh2sfdYMYVCDaHyBkqgvO7pO	su1W8bbTCVZ7No8/zT7aong0w3UUUAx3ruKNS3kXTvj+2Z5YoHWXaYDDBQ/6IV6r	OxLD5Nn0=
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	messagingengine.com; h=content-type:date:from:message-id	:mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Ei	3pwJz1DszalCS6pA6J3t3cEBU=; b=UNWgzpB9ieo6h5EIVuLvZsgp/UBN9U2sTj	3LDjyxuTIGXvS66/BIdrkvJwsZ2XKeuQqBqHQSUf3y4O8QCh0VBOMhtU1jZDXj8h	9rAt9tb4n6hryIWYgZPTKVAJLvDqiFshNrmRTWzO6+2jc2DtUUSnSbkpAOXCSPnU	fxqc3/w/8=
 
- 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
 
The format used is '${patchname} ${subject}', which is analogous to the
git backend.
---
This seems to work with both Debian and Fedora source packages.  In
Debian the first line sometimes starts with "Description:" (DEP-3 format
patches); perhaps that prefix should be removed, but for now I've erred
on the side of conservatism and left the first line unmunged.
 Functions/VCS_Info/VCS_INFO_quilt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index 1466e07..496b5b6 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -145,6 +145,22 @@ function VCS_INFO_quilt() {
         unapplied=()
     fi
 
+    if [[ -n $patches ]]; then
+      () {
+        local i line
+        for ((i=1; i<=$#applied; i++)); do
+          read -r line < "$patches/$applied[$i]" &&
+          [[ line != (#b)(---|Index:) ]] &&
+            applied[$i]+=" $line"
+        done
+        for ((i=1; i<=$#unapplied; i++)); do
+          read -r line < "$patches/$unapplied[$i]" &&
+          [[ line != (#b)(---|Index:) ]] &&
+            unapplied[$i]+=" $line"
+        done
+      }
+    fi
+
     all=( ${(Oa)applied} ${unapplied} )
 
     if VCS_INFO_hook 'gen-applied-string' "${applied[@]}"; then
-- 
2.1.4
Messages sorted by:
Reverse Date,
Date,
Thread,
Author