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