-
-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Labels
acknowledgedan issue is accepted as shortcoming to be fixedan issue is accepted as shortcoming to be fixed
Description
Current behavior 😯
The work_dir for worktrees of submodules is resolved to .git/modules/.... instead of the git-worktree directory.
For the example the discovered work_dir is .git/modules/temp-submod. I think the issue stems from somewhere in open_from_paths.
Reported via starship/starship#6417
Expected behavior 🤔
Discovered work_dir is temp-wt directory
Git behavior
Matches expected behavior
Steps to reproduce 🕹
git init
touch Readme.md
git commit -m "c"
git submodule add https://github.com/GitoxideLabs/gitoxide temp-submod
cd temp-submod
git worktree add ../../temp-wt
cd ../../temp-wt
# discover
# Repository { kind: Submodule, git_dir: "base-repo/.git/modules/temp-submod/worktrees/temp-wt", work_dir: Some("base-repo/.git/modules/temp-submod") }
Metadata
Metadata
Assignees
Labels
acknowledgedan issue is accepted as shortcoming to be fixedan issue is accepted as shortcoming to be fixed