summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2008-04-05 00:35:46 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2008-04-05 00:35:46 +0000
commit2f745f7fa46ec76d8f616c19ccb8c2eeef9a76d4 (patch)
treee7c9cdad0c71fa4dc8eecf12a8a1e746f597e199 /lisp/diff-mode.el
parent90e9ca17a7b50e827171708901f0d38fbd53ed6b (diff)
downloademacs-2f745f7fa46ec76d8f616c19ccb8c2eeef9a76d4.tar.gz
* diff-mode.el (diff-file-junk-re): Recognize the git format for
new files and for changing permissions.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 48b8f18a132..dd4615dc2ce 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -556,8 +556,9 @@ If the prefix ARG is given, restrict the view to the current file instead."
(diff-end-of-hunk)
(kill-region start (point)))))
-;; "index " and "new file mode" are output by git-diff.
-(defconst diff-file-junk-re "diff \\|index \\|new file mode")
+;; "index ", "old mode", "new mode" and "new file mode" are output by git-diff.
+(defconst diff-file-junk-re
+ "diff \\|index \\|\\(?:new\\(?: file\\)?\\|old\\) mode ")
(defun diff-beginning-of-file-and-junk ()
"Go to the beginning of file-related diff-info.