mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
epatch: Save right backups in Git multipatches
Multipatches on N Git files save wrong backups for N-1 files; only the last one has a correct backup (Bug#26084). * lisp/vc/diff-mode.el (diff-file-junk-re): Add 'Prereq: ' * lisp/vc/ediff-ptch.el (ediff-map-patch-buffer): Use 'diff-file-junk-re'. * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug25010): Rename from ibuffer-test-bug25010. (ediff-ptch-test-bug26084): New test.
This commit is contained in:
parent
205223f472
commit
abe731eef0
3 changed files with 65 additions and 9 deletions
|
|
@ -25,6 +25,8 @@
|
|||
;;; Code:
|
||||
|
||||
|
||||
(require 'diff-mode) ; For `diff-file-junk-re'.
|
||||
|
||||
(provide 'ediff-ptch)
|
||||
|
||||
(defgroup ediff-ptch nil
|
||||
|
|
@ -225,14 +227,11 @@ program."
|
|||
(if (and beg2 end2)
|
||||
(buffer-substring beg2 end2)
|
||||
"/dev/null")))
|
||||
;; check for any `Index:' or `Prereq:' lines, but don't use them
|
||||
(if (re-search-backward "^Index:" mark1-end 'noerror)
|
||||
(move-marker mark2 (match-beginning 0)))
|
||||
(if (re-search-backward "^Prereq:" mark1-end 'noerror)
|
||||
(move-marker mark2 (match-beginning 0)))
|
||||
|
||||
;; Remove file junk (Bug#26084).
|
||||
(while (re-search-backward
|
||||
(concat "^" diff-file-junk-re) mark1-end t)
|
||||
(move-marker mark2 (match-beginning 0)))
|
||||
(goto-char mark2-end)
|
||||
|
||||
(if filenames
|
||||
(setq patch-map
|
||||
(cons (ediff-make-new-meta-list-element
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue