diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2016-12-07 21:07:45 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2016-12-07 21:07:45 +0900 |
commit | 2c4970560fbb0d1efe95f8a002c181bc706c1a13 (patch) | |
tree | b08859b899145b76100cd9932fd6d42586a1d7da | |
parent | 7b1e97f0e62e0be5c89708c4aef38c0d462d2291 (diff) | |
download | emacs-2c4970560fbb0d1efe95f8a002c181bc706c1a13.tar.gz |
ediff-context-diff-label-regexp: Detect the end of second file
* lisp/vc/ediff-ptch.el (ediff-context-diff-label-regexp): Skip
'\n' in file names (Bug#25010).
* test/lisp/vc/ediff-ptch-tests.el: New file.
(ibuffer-test-bug25010): Add test for Bug#25010.
-rw-r--r-- | lisp/vc/ediff-ptch.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 6a07f805334..6e8e9473fcc 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -120,11 +120,12 @@ patch. So, don't change these variables, unless the default doesn't work." ;; This context diff does not recognize spaces inside files, but removing ' ' ;; from [^ \t] breaks normal patches for some reason (defcustom ediff-context-diff-label-regexp - (concat "\\(" ; context diff 2-liner - "^\\*\\*\\* +\\([^ \t]+\\)[^*]+[\t ]*\n--- +\\([^ \t]+\\)" - "\\|" ; unified format diff 2-liner - "^--- +\\([^ \t]+\\).*\n\\+\\+\\+ +\\([^ \t]+\\)" - "\\)") + (let ((stuff "\\([^ \t\n]+\\)")) + (concat "\\(" ; context diff 2-liner + "^\\*\\*\\* +" stuff "[^*]+[\t ]*\n--- +" stuff + "\\|" ; unified format diff 2-liner + "^--- +" stuff ".*\n\\+\\+\\+ +" stuff + "\\)")) "Regexp matching filename 2-liners at the start of each context diff. You probably don't want to change that, unless you are using an obscure patch program." |