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



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