branch: elpa/magit
commit 61c0bd8b405ad96a867706dcb523445817cd92c9
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-diff-type: Unconditionally return buffer's recorded type
    
    In [1: e94b6ebfdb] we started recording the "diff type" in diff
    buffers, but added `magit--diff-use-recorded-type-p' as a safety
    hatch.  Turns out this works just fine, so remove the knob.
    
    1: 2023-03-18 e94b6ebfdbe4fe6253e69cc9783e8e2aa1af2700
       Record diff-type in magit-diff-mode buffers
---
 lisp/magit-diff.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 3d7d36743c0..72a2eede3ef 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -3225,8 +3225,6 @@ It the SECTION has a different type, then do nothing."
 
 ;;; Diff Type
 
-(defvar magit--diff-use-recorded-type-p t)
-
 (defun magit-diff-type (&optional section)
   "Return the diff type of SECTION.
 
@@ -3255,8 +3253,7 @@ Do not confuse this with `magit-diff-scope' (which see)."
           ((derived-mode-p 'magit-diff-mode)
            (let ((range magit-buffer-range)
                  (const magit-buffer-typearg))
-             (cond ((and magit--diff-use-recorded-type-p
-                         magit-buffer-diff-type))
+             (cond (magit-buffer-diff-type)
                    ((equal const "--no-index") 'undefined)
                    ((or (not range)
                         (equal range "HEAD")

Reply via email to