[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 5f5e065e1e 2/3: magit-list-worktrees: Always in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 5f5e065e1e 2/3: magit-list-worktrees: Always include path in returned value |
Date: |
Sun, 21 Aug 2022 14:58:39 -0400 (EDT) |
branch: elpa/git-commit
commit 5f5e065e1e8d591fda25f95fcd466fa6b4b82f62
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@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")