Open phkorn opened 3 months ago
I am able to reproduce this following your instructions.
Git blame works on submodules if the workspace includes the parent. Git blame does not work on submodules if you open that as the root of your workspace.
Thanks for reporting.
I took a look at the code and the problem is the following:
The ancestor directory, which is not in the worktree, gets added to the git_repositories
as ProjectEntryId(0)
due to work_dir_path
being set to ""
.
When it scans the current worktree and finds the .git folder it gets also treated as ProjectEntryId(0)
since again the work_dir_path
is ""
.
CodePath: https://github.com/zed-industries/zed/blob/c1872e9cb09c72c9378908a0f8b33fe2c4fc3e07/crates/worktree/src/worktree.rs#L2852
Scanning ancestor git folders of the worktree and treating them as being part of the worktree is the culprit here.
Check for existing issues
Describe the bug / provide steps to reproduce it
Do the following
When editing any file, no blame or git_diff indicators appear.
Environment
Zed: v0.141.2 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.Zed.log