[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 197f51f 5/8: magit-list-worktree: Make sure all
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 197f51f 5/8: magit-list-worktree: Make sure all paths are worktrees |
Date: |
Tue, 12 Oct 2021 14:57:48 -0400 (EDT) |
branch: elpa/git-commit
commit 197f51fd5b1d43dfc7672bd6b51cd0e3311797d2
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-list-worktree: Make sure all paths are worktrees
If the git directory is separate from the main worktree,
then "git worktree" returns the git directory instead of
the worktree, which isn't what it is supposed to do and
now what we want.
---
Documentation/RelNotes/3.4.0.org | 4 ++++
lisp/magit-git.el | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/Documentation/RelNotes/3.4.0.org b/Documentation/RelNotes/3.4.0.org
index 36ee456..5543fe9 100644
--- a/Documentation/RelNotes/3.4.0.org
+++ b/Documentation/RelNotes/3.4.0.org
@@ -9,3 +9,7 @@
- Automatic saving of file-visiting buffers was broken inside remote
repositories that are accessed using Tramp. #4292
+
+- Worktree commands and listing worktrees in the status buffer were
+ broken inside remote repositories that are accessed using Tramp.
+ #4326
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index c399b05..6056e94 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1833,6 +1833,11 @@ PATH has to be relative to the super-repository."
(let ((path (substring line 9)))
(when remote
(setq path (concat remote path)))
+ ;; If the git directory is separate from the main
+ ;; worktree, then "git worktree" returns the git
+ ;; directory instead of the worktree, which isn't
+ ;; what it is supposed to do and now what we want.
+ (setq path (magit-toplevel path))
(setq worktree (list path nil nil nil))
(push worktree worktrees)))
((string-equal line "bare")
- [nongnu] elpa/git-commit updated (cabcc9c -> 348d9b9), ELPA Syncer, 2021/10/12
- [nongnu] elpa/git-commit b137e7d 1/8: magit-save-repository-buffers: Fix saving of remote buffers, ELPA Syncer, 2021/10/12
- [nongnu] elpa/git-commit ba9caff 2/8: magit-save-repository-buffers: Assert file is writable, ELPA Syncer, 2021/10/12
- [nongnu] elpa/git-commit 7aa314c 4/8: Fix worktree commands when using tramp, ELPA Syncer, 2021/10/12
- [nongnu] elpa/git-commit 197f51f 5/8: magit-list-worktree: Make sure all paths are worktrees,
ELPA Syncer <=
- [nongnu] elpa/git-commit 0b9927d 7/8: magit-section: Fix :package-version of options, ELPA Syncer, 2021/10/12
- [nongnu] elpa/git-commit 09333d6 3/8: magit-save-repository-buffers: Rearrange and improve comments, ELPA Syncer, 2021/10/12
- [nongnu] elpa/git-commit 7a94132 6/8: Rename magit-keep-region-overlay to magit-section-keep-region-overlay, ELPA Syncer, 2021/10/12
- [nongnu] elpa/git-commit 348d9b9 8/8: magit-section: Fix immediate selection highlighting, ELPA Syncer, 2021/10/12