mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 08:43:40 -07:00
Fix the regression in dired-backup-diff's diff-goto-source behavior
* lisp/vc/diff-mode.el (diff-find-source-location): Undo part of the previous change, so that 'reverse' does not affect whether the "other file" is used (bug#62731). (diff-apply-hunk): Make that choice here.
This commit is contained in:
parent
60e58be091
commit
1374f20491
1 changed files with 2 additions and 2 deletions
|
|
@ -1970,7 +1970,7 @@ SWITCHED is non-nil if the patch is already applied."
|
|||
diff-context-mid-hunk-header-re nil t)
|
||||
(error "Can't find the hunk separator"))
|
||||
(match-string 1)))))
|
||||
(file (or (diff-find-file-name (xor other reverse) noprompt)
|
||||
(file (or (diff-find-file-name other noprompt)
|
||||
(error "Can't find the file")))
|
||||
(revision (and other diff-vc-backend
|
||||
(if reverse (nth 1 diff-vc-revisions)
|
||||
|
|
@ -2047,7 +2047,7 @@ With a prefix argument, REVERSE the hunk."
|
|||
;; TODO: make it possible to ask explicitly for this behavior.
|
||||
;;
|
||||
;; This is duplicated in diff-test-hunk.
|
||||
(diff-find-source-location deletion reverse)))
|
||||
(diff-find-source-location (xor deletion reverse) reverse)))
|
||||
(cond
|
||||
((null line-offset)
|
||||
(user-error "Can't find the text to patch"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue