branch: externals/debbugs
commit 7f6186e536afe0b4dff4245ab99a6d44ffe63a04
Author: Lars Ingebrigtsen <[email protected]>
Commit: Lars Ingebrigtsen <[email protected]>
Also accept octet parts in debbugs-gnu patches
* packages/debbugs/debbugs-gnu.el (debbugs-gnu-apply-patch): Also
accept octet parts
---
debbugs-gnu.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 5dea0d3..272441b 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -2178,7 +2178,7 @@ If SELECTIVELY, query the user before applying the patch."
(with-current-buffer gnus-article-buffer
(dolist (handle (mapcar #'cdr (gnus-article-mime-handles)))
(when
- (string-match "diff\\|patch\\|plain" (mm-handle-media-type handle))
+ (string-match "diff\\|patch\\|plain\\|octet" (mm-handle-media-type
handle))
(push (cons (mm-handle-encoding handle)
(mm-handle-buffer handle))
patch-buffers))))
@@ -2243,6 +2243,9 @@ If SELECTIVELY, query the user before applying the patch."
(defun debbugs-gnu-diff-hunk-target-name (dir)
(let ((names nil))
(dolist (name (diff-hunk-file-names))
+ ;; The function above may return names like
+ ;; "lisp/custom.el 2013-06-14 12:10:30 +0000"
+ (setq name (car (split-string name " ")))
(unless (string-match "[ #<>]" name)
(when (string-match "\\`/" name)
;; This is an absolute path, so try to find the target.