aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Gutov2024-10-08 02:25:14 +0300
committerDmitry Gutov2024-10-08 02:25:21 +0300
commit2d139141a6c249691a50ade9c8d08dc35fcdf456 (patch)
treea047186eb212e3d768855ca860332161b1a243c1 /src
parent9904376c797665de47ff760bcf8c2fe33d7ae625 (diff)
downloademacs-2d139141a6c249691a50ade9c8d08dc35fcdf456.tar.gz
emacs-2d139141a6c249691a50ade9c8d08dc35fcdf456.zip
Support file creation and deletion in diff-apply-hunk
* lisp/vc/diff-mode.el (diff-find-file-name): Allow entering non-existing file name when the corresponding hunk is of type "create file" (bug#62731). Default to file name with deleted prefix if diff-buffer-type is Git or Hg. Make sure not to add such input to diff-remembered-files-alist, it would be hard to change otherwise in case of typo. (diff-setup-buffer-type): Match against the diff header common to 'hg diff' output. (diff-find-source-location): Look at the other source when the buffer is applied in reverse. (diff-apply-hunk): Delect file deletion and pass a different argument to 'diff-find-source-location' in such case. Bind diff-vc-backend to nil to avoid older revision buffer being returned. In the end, offer to delete the file if the hunk was of corresponding type and matched the existing contents. * etc/NEWS: Mention the new capability.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions