GitHub issue #58055 in zed-industries/zed, created 2026-05-29 by prolific, reports that when Zed creates a git worktree with the default git.worktree_directory setting, the resulting path contains the project name twice, so basename on the worktree path returns the project name instead of the meaningful random worktree name, and third-party tools that display or label the worktree by its path basename show the generic project name rather than the distinctive random identifier. The report gives reproduction steps: open a project in Zed, keep git.worktree_directory at its default, create a new worktree through the branch picker, and observe a created path whose basename is the project name rather than the random name. Its stated root cause is that resolve_worktree_directory in crates/git/src/repository.rs appends the project name once for collision prevention when outside the project root, and then the worktree creation code adds the project name again as the leaf directory. The expected behavior is that the worktree checkout directory should not redundantly repeat the project name and the random name should be the final path component, matching how other worktree-creating tools construct their paths. The report notes a workaround of setting git.worktree_directory inside the project root, which avoids the first append but places worktrees inside the project directory rather than alongside it. The report was filed against Zed 1.4.4, with empty log, settings and keymap attachments.
Verbatim Excerpts from Cited Records
“When Zed creates a git worktree with the default `git.worktree_directory` (`"../worktrees"`), the resulting path contains the project name **twice**:”
·
zed-industries/zed (issue 58055 opening body, Current vs. Expected behavior section)
·
2026-05-29T09:40:37Z
·GitHub Issue ↗
“This means `basename()` on the worktree path returns `my-project` instead of the meaningful worktree name `crisp-breeze`.”
·
zed-industries/zed (issue 58055 opening body, Current vs. Expected behavior section)
·
2026-05-29T09:40:37Z
·GitHub Issue ↗
“`resolve_worktree_directory()` in `crates/git/src/repository.rs` appends the project name once (for collision prevention when outside the project root).”
·
zed-industries/zed (issue 58055 opening body, Root Cause section)
·
2026-05-29T09:40:37Z
·GitHub Issue ↗
“`basename()` would then return `crisp-breeze`, matching how other worktree-creating tools (e.g., OpenCode) construct their paths: `{base}/{hash}/{random-name}` — where `random-name` is both the identifier and the checkout root.”
·
zed-industries/zed (issue 58055 opening body, Expected Behavior section)
·
2026-05-29T09:40:37Z
·GitHub Issue ↗
Counter-record: Issue remains open as of 2026-12-02 (last updated 2026-12-01T09:37:57Z). 10 comments read in total. Labels include area:integrations/git, state:reproducible, reach:some users and severity:S3. zed-community-bot (2026-05-29) added triage context linking a recently closed related issue about worktree naming. hferreiro (2026-06-01 and 2026-06-05) linked related issue 57703 and a fix PR 58648. yara-blue (2026-06-05) said they would triage the PR once the issue was reproduced. miguelraz (2026-06-05) said the behavior was intended as part of the initial design but might be due for an overhaul, and that it was reproduced. edzis (2026-07-08) proposed a worktree location template or a pre-create hook. willlma (2026-07-31) linked related issue 53673. maiertech (2026-09-12), liquid1982 (2026-10-18) and nikbucher (2026-12-01) added further examples and support, with nikbucher proposing a worktree_include_repo_name setting defaulting to current behavior. No maintainer decision to fix or to decline the change appears in the surveyed thread. The claim documents only the original report, not a verified current state.
Falsification probe: If GitHub issue #58055 is closed as fixed, as a duplicate, or as not planned, if the author edits the opening body so the quoted sentences no longer match verbatim, or if the author posts a retraction of the report, this claim drops to Withdrawn.
Audit verification: Verified 100% continuous verbatim substring against official GitHub REST API by
scripts/verify_claim_verbatim.py.