--- Begin Message ---
Subject: |
29.2; project root directory is wrong for submodules of worktrees |
Date: |
Mon, 4 Mar 2024 16:21:48 +0100 |
User-agent: |
Mozilla Thunderbird |
Hi,
when navigating to a file in a git submodule, the project root stays in
the parent repository.
If the submodule is part of a git worktree, however, this does not work
as expected and the project root switches to the directory of the
submodule itself.
The issue seems to be how project--submodule-p is checking whether the
current repository is a submodule.
In the worktree case, there is the worktree path between the .git and
modules directory in the gitfile.
There may also be regular directory names before the .git directory
apart of "../".
I have attached a patch to fix this.
Best,
Patrick
0001-fix-project-submodule-detection-does-not-work-for-wo.patch
Description: Text Data
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#69547: 29.2; project root directory is wrong for submodules of worktrees |
Date: |
Fri, 15 Mar 2024 04:25:46 +0200 |
User-agent: |
Mozilla Thunderbird |
Hi!
On 04/03/2024 17:21, Patrick Bader wrote:
when navigating to a file in a git submodule, the project root stays in
the parent repository.
If the submodule is part of a git worktree, however, this does not work
as expected and the project root switches to the directory of the
submodule itself.
The issue seems to be how project--submodule-p is checking whether the
current repository is a submodule.
In the worktree case, there is the worktree path between the .git and
modules directory in the gitfile.
There may also be regular directory names before the .git directory
apart of "../".
I have attached a patch to fix this.
Thanks! Installed.
--- End Message ---