branch: elpa/git-commit commit 5f5e065e1e8d591fda25f95fcd466fa6b4b82f62 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-list-worktrees: Always include path in returned value `magit-insert-worktree' fails otherwise, preventing the status buffer from being fully populated. --- lisp/magit-git.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/magit-git.el b/lisp/magit-git.el index 07095caec9..0cc8c09390 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -2013,7 +2013,9 @@ PATH has to be relative to the super-repository." ;; worktree, then "git worktree" returns the git ;; directory instead of the worktree, which isn't ;; what it is supposed to do and not what we want. - (setq path (magit-toplevel path)) + ;; However, if the worktree has been removed, then + ;; we want to return it anway; instead of nil. + (setq path (or (magit-toplevel path) path)) (setq worktree (list path nil nil nil)) (push worktree worktrees))) ((string-equal line "bare")