update packages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; magit-diff.el --- inspect Git diffs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2020 The Magit Project Contributors
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
@@ -75,6 +75,7 @@
|
||||
(defgroup magit-diff nil
|
||||
"Inspect and manipulate Git diffs."
|
||||
:link '(info-link "(magit)Diffing")
|
||||
:group 'magit-commands
|
||||
:group 'magit-modes)
|
||||
|
||||
(defcustom magit-diff-mode-hook nil
|
||||
@@ -298,11 +299,14 @@ that many spaces. Otherwise, highlight neither."
|
||||
:link '(info-link "(magit)Revision Buffer")
|
||||
:group 'magit-modes)
|
||||
|
||||
(defcustom magit-revision-mode-hook '(bug-reference-mode)
|
||||
(defcustom magit-revision-mode-hook
|
||||
'(bug-reference-mode
|
||||
goto-address-mode)
|
||||
"Hook run after entering Magit-Revision mode."
|
||||
:group 'magit-revision
|
||||
:type 'hook
|
||||
:options '(bug-reference-mode))
|
||||
:options '(bug-reference-mode
|
||||
goto-address-mode))
|
||||
|
||||
(defcustom magit-revision-sections-hook
|
||||
'(magit-insert-revision-tag
|
||||
@@ -817,14 +821,16 @@ and `:slant'."
|
||||
;;; Section Classes
|
||||
|
||||
(defclass magit-file-section (magit-section)
|
||||
((source :initform nil)
|
||||
(header :initform nil)))
|
||||
((keymap :initform magit-file-section-map)
|
||||
(source :initform nil)
|
||||
(header :initform nil)))
|
||||
|
||||
(defclass magit-module-section (magit-file-section)
|
||||
())
|
||||
((keymap :initform magit-hunk-section-map)))
|
||||
|
||||
(defclass magit-hunk-section (magit-section)
|
||||
((refined :initform nil)
|
||||
((keymap :initform magit-hunk-section-map)
|
||||
(refined :initform nil)
|
||||
(combined :initform nil)
|
||||
(from-range :initform nil)
|
||||
(from-ranges :initform nil)
|
||||
@@ -939,7 +945,7 @@ and `:slant'."
|
||||
:description "Context lines"
|
||||
:class 'transient-option
|
||||
:argument "-U"
|
||||
:reader 'transient-read-number-N+)
|
||||
:reader 'transient-read-number-N0)
|
||||
|
||||
(transient-define-argument magit-diff:-M ()
|
||||
:description "Detect renames"
|
||||
@@ -1059,13 +1065,13 @@ If no DWIM context is found, nil is returned."
|
||||
(cons 'commit
|
||||
(magit-section-case
|
||||
(commit (oref it value))
|
||||
(file (-> it
|
||||
(oref parent)
|
||||
(oref value)))
|
||||
(hunk (-> it
|
||||
(oref parent)
|
||||
(oref parent)
|
||||
(oref value))))))
|
||||
(file (thread-first it
|
||||
(oref parent)
|
||||
(oref value)))
|
||||
(hunk (thread-first it
|
||||
(oref parent)
|
||||
(oref parent)
|
||||
(oref value))))))
|
||||
((derived-mode-p 'magit-revision-mode)
|
||||
(cons 'commit magit-buffer-revision))
|
||||
((derived-mode-p 'magit-diff-mode)
|
||||
@@ -1332,9 +1338,6 @@ for a revision."
|
||||
(magit-section-update-highlight)
|
||||
t))
|
||||
|
||||
(cl-defmethod magit-buffer-value (&context (major-mode magit-revision-mode))
|
||||
(cons magit-buffer-range magit-buffer-diff-files))
|
||||
|
||||
;;;; Setting Commands
|
||||
|
||||
(defun magit-diff-switch-range-type ()
|
||||
@@ -1553,7 +1556,7 @@ Like `magit-diff-visit-worktree-file' but use
|
||||
(defun magit-diff-visit-file--internal (file force-worktree fn)
|
||||
"From a diff visit the appropriate version of FILE.
|
||||
If FORCE-WORKTREE is non-nil, then visit the worktree version of
|
||||
the file, even if the diff is about a committed change. USE FN
|
||||
the file, even if the diff is about a committed change. Use FN
|
||||
to display the buffer in some window."
|
||||
(if (magit-file-accessible-directory-p file)
|
||||
(magit-diff-visit-directory file force-worktree)
|
||||
@@ -1827,7 +1830,7 @@ commit or stash at point, then prompt for a commit."
|
||||
(cond ((and (--any-p (oref it hidden) children)
|
||||
(--any-p (oref it children) children))
|
||||
(mapc 'magit-section-show-headings sections))
|
||||
((-any-p 'magit-section-hidden-body children)
|
||||
((seq-some 'magit-section-hidden-body children)
|
||||
(mapc 'magit-section-show-children sections))
|
||||
(t
|
||||
(mapc 'magit-section-hide sections)))))))
|
||||
@@ -2557,7 +2560,7 @@ or a ref which is not a branch, then it inserts nothing."
|
||||
(eq magit-revision-insert-related-refs 'all))
|
||||
(magit--insert-related-refs
|
||||
magit-buffer-revision "--contains" "Contained"
|
||||
(eq magit-revision-insert-related-refs '(all mixed)))
|
||||
(memq magit-revision-insert-related-refs '(all mixed)))
|
||||
(when-let ((follows (magit-get-current-tag magit-buffer-revision t)))
|
||||
(let ((tag (car follows))
|
||||
(cnt (cadr follows)))
|
||||
@@ -2810,10 +2813,10 @@ Do not confuse this with `magit-diff-scope' (which see)."
|
||||
(if (memq type '(file module))
|
||||
(magit-diff-type parent)
|
||||
type)))
|
||||
(`hunk (-> it
|
||||
(oref parent)
|
||||
(oref parent)
|
||||
(oref type)))))))
|
||||
(`hunk (thread-first it
|
||||
(oref parent)
|
||||
(oref parent)
|
||||
(oref type)))))))
|
||||
((derived-mode-p 'magit-log-mode)
|
||||
(if (or (and (magit-section-match 'commit section)
|
||||
(oref section children))
|
||||
|
||||
Reference in New Issue
Block a user