Function: magit-ediff-show-stash

magit-ediff-show-stash is an autoloaded, interactive and byte-compiled function defined in magit-ediff.el.

Signature

(magit-ediff-show-stash ARG1)

Documentation

Show changes introduced by STASH using Ediff.

magit-ediff-show-stash-with-index controls whether a three-buffer Ediff is used in order to distinguish changes in the stash that were staged.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-ediff.el
;;;###autoload(autoload 'magit-ediff-show-stash "magit-ediff" nil t)
(transient-define-suffix magit-ediff-show-stash (stash)
  "Show changes introduced by STASH using Ediff.
`magit-ediff-show-stash-with-index' controls whether a three-buffer
Ediff is used in order to distinguish changes in the stash that were
staged."
  :inapt-if-not #'magit-list-stashes
  (interactive (list (magit-read-stash "Stash")))
  (pcase-let* ((revA (concat stash "^1"))
               (revB (concat stash "^2"))
               (revC stash)
               (`(,fileA ,fileC) (magit-ediff-read-files revA revC))
               (fileB fileC))
    (if (and magit-ediff-show-stash-with-index
             (member fileA (magit-changed-files revB revA)))
        (magit-ediff-buffers
         (magit-ediff--find-file revA fileA)
         (magit-ediff--find-file revB fileB)
         (magit-ediff--find-file revC fileC))
      (magit-ediff-compare revA revC fileA fileC))))