diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2026-03-18 02:21:37 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2026-03-18 02:21:37 +0100 |
| commit | b3c37f363cf8ec95da97166e6da4fb7faaaefe1d (patch) | |
| tree | 7ef9c22fc0c3bbdbbf8b11713e2b3c9798f52dd6 | |
| parent | f5f5ca6c7569d2c4afd128a986bb9a741df66cf3 (diff) | |
magit-ediff-read-files: Handle "{worktree}" revision
In cases where previously REVA or REVB would have been nil, the
argument is "{worktree}" since [1: 26de054bcf]. Some functions
we call from here, cannot handle that, so substitute nil.
Closes #5536.
1: 2026-02-12 26de054bcfee75a606224313dffc567a6fcbd1ba
magit-ediff-compare--read-revisions: Use "{worktree}" symbolic rev
| -rw-r--r-- | lisp/magit-ediff.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/magit-ediff.el b/lisp/magit-ediff.el index d72c19a..5edfa94 100644 --- a/lisp/magit-ediff.el +++ b/lisp/magit-ediff.el @@ -293,6 +293,8 @@ range)." "Read file in REVB, return it and the corresponding file in REVA. When FILEB is non-nil, use this as REVB's file instead of prompting for it." + (when (equal revA "{worktree}") (setq revA nil)) + (when (equal revB "{worktree}") (setq revB nil)) (unless (and fileB (member fileB (magit-revision-files revB))) (setq fileB (or (and fileB |
