emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit a4c443239e: magit-diff-visit--hunk: Update for


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit a4c443239e: magit-diff-visit--hunk: Update for change in chmod hunk value
Date: Sun, 6 Mar 2022 15:58:21 -0500 (EST)

branch: elpa/git-commit
commit a4c443239ee84b2d07a04431d900af1add0b12cd
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    magit-diff-visit--hunk: Update for change in chmod hunk value
    
    magit-diff-visit--hunk detects mode change hunks (and returns nil) by
    checking if the section has no value.  However, since fa804439
    (Restore ability to apply header hunks individually, 2021-07-12),
    chmod hunks have a non-nil value.  Update the condition.
    
    Fixes #4623.
---
 docs/RelNotes/3.4.0.org | 4 ++++
 lisp/magit-diff.el      | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/docs/RelNotes/3.4.0.org b/docs/RelNotes/3.4.0.org
index f927a0d0cd..88c335996f 100644
--- a/docs/RelNotes/3.4.0.org
+++ b/docs/RelNotes/3.4.0.org
@@ -55,3 +55,7 @@
 
 - Since v3.0.0, ~magit-pull-from-pushremote~ has failed on
   non-fast-forward merges.  #4604
+
+- A regression from v3.2.0 broke visiting a file when that file has a
+  mode change and point is on the file or the mode change section.
+  #4623
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index ee51b2e535..a5183b6899 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1665,8 +1665,7 @@ the Magit-Status buffer for DIRECTORY."
        section
        ;; Currently the `hunk' type is also abused for file
        ;; mode changes, which we are not interested in here.
-       ;; Such sections have no value.
-       (oref section value)
+       (not (equal (oref section value) '(chmod)))
        section))))
 
 (defun magit-diff-visit--goto-from-p (section in-worktree)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]