summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Functions/VCS_Info/VCS_INFO_quilt30
2 files changed, 33 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fe93bc724..dffd3b35a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-10-24  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 36913 + 36945: Functions/VCS_Info/VCS_INFO_quilt: vcs_info quilt:
+	Pass patch subject lines to gen-applied-string
+
 	* 36912: Functions/VCS_Info/VCS_INFO_quilt: vcs_info quilt:
 	Tolerate being in child of .pc's parent
 
diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index 29603a27a..c3c3d864d 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -145,6 +145,36 @@ function VCS_INFO_quilt() {
         unapplied=()
     fi
 
+    if [[ -n $patches ]]; then
+      () {
+        local i line
+        for ((i=1; i<=$#applied; i++)); do
+          if [[ -f "$patches/$applied[$i]" ]] &&
+             read -r line < "$patches/$applied[$i]" &&
+             [[ $line != (#b)(---|Index:)* ]] &&
+             true
+            ;
+          then
+            applied[$i]+=" $line"
+          else
+            applied[$i]+=" ?"
+          fi
+        done
+        for ((i=1; i<=$#unapplied; i++)); do
+          if [[ -f "$patches/$unapplied[$i]" ]] &&
+             read -r line < "$patches/$unapplied[$i]" &&
+             [[ $line != (#b)(---|Index:)* ]] &&
+             true
+            ;
+          then
+            unapplied[$i]+=" $line"
+          else
+            unapplied[$i]+=" ?"
+          fi
+        done
+      }
+    fi
+
     all=( ${(Oa)applied} ${unapplied} )
 
     if VCS_INFO_hook 'gen-applied-string' "${applied[@]}"; then