From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH 2/2] vcs_info quilt: Pass patch subject lines to gen-applied-string
Date: Thu, 22 Oct 2015 12:30:57 +0000 [thread overview]
Message-ID: <20151022123057.GG7173@tarsus.local2> (raw)
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
next reply other threads:[~2015-10-22 12:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 12:30 Daniel Shahaf [this message]
2015-10-24 20:25 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151022123057.GG7173@tarsus.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).