git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-worktree-list reporting wrong directory

From
EAErik Aigner <erik@bytieful.com>
Date
Nov 30, 2022, 20:33 UTC
Message-ID
<A0CB7B70-8EB2-464E-9BF9-320FC6EC3C44@bytieful.com>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
- Create a repository containing a submodule
- `cd` to the submodules directory
- run `git worktree list`
What did you expect to happen? (Expected behavior)
- The current directory is reported as the worktree
What happened instead? (Actual behavior)
- Instead the `/path/to/repo/.git/modules/reposubmodule` directory is listed as a worktree
What's different between what you expected and what actually happened?
The `/path/to/repo/.git/modules/reposubmodule` is the repository path, not the worktree path.
Anything else you want to add:
-

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.37.1 (Apple Git-137.1) cpu: arm64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Darwin 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:52 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8112 arm64 compiler info: clang: 14.0.0 (clang-1400.0.29.202) libc info: no libc information available $SHELL (typically, interactive shell): /bin/zsh

[Enabled Hooks] pre-commit

Message 1 of 1 in “git-worktree-list reporting wrong directory”
  1. Erik AignerNov 30, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.