branch: elpa/magit
commit b08b6ceb9c63da54eb054845747bdcb0604c042c
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-diff.el: Split up "Diff Mode" section
---
lisp/magit-diff.el | 54 +++++++++++++++++++++++++++++-------------------------
1 file changed, 29 insertions(+), 25 deletions(-)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index fb69b17e2f9..beb972fda7b 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -2235,31 +2235,7 @@ keymap is the parent of their keymaps."
map)
"Keymap for `hunk' sections.")
-(defconst magit-diff-conflict-headline-re
- (concat "^" (regexp-opt
- ;; Defined in merge-tree.c in this order.
- '("merged"
- "added in remote"
- "added in both"
- "added in local"
- "removed in both"
- "changed in both"
- "removed in local"
- "removed in remote"))))
-
-(defconst magit-diff-headline-re
- (concat "^\\(@@@?\\|diff\\|Submodule\\|"
- "\\* Unmerged path\\|"
- (substring magit-diff-conflict-headline-re 1)
- "\\)"))
-
-(defconst magit-diff-statline-re
- (concat "^ ?"
- "\\(.*\\)" ; file
- "\\( +| +\\)" ; separator
- "\\([0-9]+\\|Bin\\(?: +[0-9]+ -> [0-9]+ bytes\\)?$\\) ?"
- "\\(\\+*\\)" ; add
- "\\(-*\\)$")) ; del
+;;; Diff Insert
(defvar magit-diff--reset-non-color-moved
(list
@@ -2316,6 +2292,34 @@ keymap is the parent of their keymaps."
args)
args))
+;;; Diff Wash
+
+(defconst magit-diff-conflict-headline-re
+ (concat "^" (regexp-opt
+ ;; Defined in merge-tree.c in this order.
+ '("merged"
+ "added in remote"
+ "added in both"
+ "added in local"
+ "removed in both"
+ "changed in both"
+ "removed in local"
+ "removed in remote"))))
+
+(defconst magit-diff-headline-re
+ (concat "^\\(@@@?\\|diff\\|Submodule\\|"
+ "\\* Unmerged path\\|"
+ (substring magit-diff-conflict-headline-re 1)
+ "\\)"))
+
+(defconst magit-diff-statline-re
+ (concat "^ ?"
+ "\\(.*\\)" ; file
+ "\\( +| +\\)" ; separator
+ "\\([0-9]+\\|Bin\\(?: +[0-9]+ -> [0-9]+ bytes\\)?$\\) ?"
+ "\\(\\+*\\)" ; add
+ "\\(-*\\)$")) ; del
+
(defun magit-diff-use-window-width-as-stat-width ()
"Use the `window-width' as the value of `--stat-width'."
(and-let* ((window (get-buffer-window (current-buffer) 'visible)))