GNU bug report logs -
#35420
Support git in ediff-patch-file
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Wed, 24 Apr 2019 21:42:02 UTC
Severity: wishlist
Tags: patch
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
This patch adds support for git patches to ediff-patch-file:
[ediff-ptch.git.patch (text/x-diff, inline)]
diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el
index 4178b5a8c0..5c71c2c8cb 100644
--- a/lisp/vc/ediff-ptch.el
+++ b/lisp/vc/ediff-ptch.el
@@ -297,11 +297,15 @@ ediff-fixup-patch-map
;; file names. This is a heuristic intended to improve guessing
(let ((default-directory (file-name-directory filename)))
(unless (or (file-name-absolute-p base-dir1)
- (file-name-absolute-p base-dir2)
- (not (file-exists-p base-dir1))
- (not (file-exists-p base-dir2)))
- (setq base-dir1 ""
- base-dir2 "")))
+ (file-name-absolute-p base-dir2))
+ (if (and (file-exists-p base-dir1)
+ (file-exists-p base-dir2))
+ (setq base-dir1 ""
+ base-dir2 "")
+ (when (and (string-match-p "^a/" base-dir1)
+ (string-match-p "^b/" base-dir2))
+ (setq base-dir1 "a/"
+ base-dir2 "b/")))))
(or (string= (car proposed-file-names) "/dev/null")
(setcar proposed-file-names
(ediff-file-name-sans-prefix
This bug report was last modified 6 years and 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.