Function: magit-diff-visit-directory
magit-diff-visit-directory is a byte-compiled function defined in
magit-diff.el.
Signature
(magit-diff-visit-directory DIRECTORY &optional OTHER-WINDOW)
Documentation
Visit DIRECTORY in some window.
Display the buffer in the selected window unless OTHER-WINDOW is non-nil. If DIRECTORY is the top-level directory of the current repository, then visit the containing directory using Dired and in the Dired buffer put point on DIRECTORY. Otherwise display the Magit-Status buffer for DIRECTORY.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-diff.el
(defun magit-diff-visit-directory (directory &optional other-window)
"Visit DIRECTORY in some window.
Display the buffer in the selected window unless OTHER-WINDOW is
non-nil. If DIRECTORY is the top-level directory of the current
repository, then visit the containing directory using Dired and
in the Dired buffer put point on DIRECTORY. Otherwise display
the Magit-Status buffer for DIRECTORY."
(if (equal (magit-toplevel directory)
(magit-toplevel))
(dired-jump other-window (concat directory "/."))
(let ((display-buffer-overriding-action
(if other-window
'(nil (inhibit-same-window . t))
'(display-buffer-same-window))))
(magit-status-setup-buffer directory))))