]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle missing space marker in unified diff during header fixup
authorAndreas Schwab <schwab@linux-m68k.org>
Sat, 16 Aug 2014 19:51:27 +0000 (21:51 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Sat, 16 Aug 2014 19:51:27 +0000 (21:51 +0200)
* vc/diff-mode.el (diff-fixup-modifs): Handle empty line in
context of unified diff.

lisp/ChangeLog
lisp/vc/diff-mode.el

index 458ab57d01184bb7063ebcb5eefdb79f631b0c92..2a1d3b94427018cd4018bf209881c2fa88b62f94 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-16  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * vc/diff-mode.el (diff-fixup-modifs): Handle empty line in
+       context of unified diff.
+
 2014-08-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        Add dependencies to fix loaddefs race during parallel builds.
index 4908c5f496148aa55b60821c975a6277b4cd2a3f..d4e973956c8e3aff31df51273df604ff672d1400 100644 (file)
@@ -1220,6 +1220,9 @@ else cover the whole buffer."
                (?- (cl-incf minus))
                (?! (cl-incf bang))
                ((or ?\\ ?#) nil)
+               (?\n (if diff-valid-unified-empty-line
+                        (cl-incf space)
+                      (setq space 0 plus 0 minus 0 bang 0)))
                (_  (setq space 0 plus 0 minus 0 bang 0)))
            (cond
             ((looking-at diff-hunk-header-re-unified)