]> git.eshelyaron.com Git - emacs.git/commit
Teach diff-apply-hunk to handle hunks with empty context
authorTomas Nordin <tomasn@posteo.net>
Sat, 15 Mar 2025 02:08:47 +0000 (04:08 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 15 Mar 2025 17:10:55 +0000 (18:10 +0100)
commit948360a1e2259eb279108b8e6a852d20373fe7f4
tree62a5f98d3c49d4700af9e8adebe4a3b5e60fa0cf
parent8dea08c878b6073328502a2680a38d710cb94b44
Teach diff-apply-hunk to handle hunks with empty context

* lisp/vc/diff-mode.el (diff-find-source-location):
Consider the case when there is no diff context above or below
edited lines.  (bug#72556)

* test/lisp/vc/diff-mode-tests.el: Add tests for undoing hunks
from diffs with addtions only in the beginning or end of the
source file.

(cherry picked from commit 4980287e081d3efd29f64973938ca2a0575f521e)
lisp/vc/diff-mode.el
test/lisp/vc/diff-mode-tests.el