projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66d1513
)
Do not count git markers as "deleted lines"
author
Konstantin Kharlamov
<Hi-Angel@yandex.ru>
Thu, 23 Sep 2021 21:25:41 +0000
(23:25 +0200)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Thu, 23 Sep 2021 21:25:41 +0000
(23:25 +0200)
* lisp/vc/diff-mode.el (diff-fixup-modifs): Skip "end of patch"
markers that `git-format-patch` leaves around (bug#50761).
lisp/vc/diff-mode.el
patch
|
blob
|
history
diff --git
a/lisp/vc/diff-mode.el
b/lisp/vc/diff-mode.el
index 0852f8790e96ea5ec38da4f17577e06fe2e28e34..057ffcd06e38b3661e2dd9dcc04ba569ce2a9efe 100644
(file)
--- a/
lisp/vc/diff-mode.el
+++ b/
lisp/vc/diff-mode.el
@@
-1355,7
+1355,11
@@
else cover the whole buffer."
(pcase (char-after)
(?\s (cl-incf space))
(?+ (cl-incf plus))
- (?- (cl-incf minus))
+ (?- (unless ;; In git format-patch "^-- $" signifies
+ ;; the end of the patch.
+ (and (eq diff-buffer-type 'git)
+ (looking-at "^-- $"))
+ (cl-incf minus)))
(?! (cl-incf bang))
((or ?\\ ?#) nil)
(?\n (if diff-valid-unified-empty-line