Skip to content

Worktree resolves to wrong path #2052

Open
@ibhagwan

Description

@ibhagwan

Current behavior 😯

When using a git bare repo with submodules (dotfiles) gix status results in a crash, it seels that the submodule is resolved to the wrong path (missing the username, should be /home/bhagwan...):

Image

Text version of the error:

→ gix status
Error: Could not determine status for submodule at '.config/awesome/lain'

Caused by:
    Worktree root at '/home/.config/awesome/lain' is not a directory

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  10: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:360:3
  11: <unknown>

Expected behavior 🤔

Expected to return the output of the status command.

Git behavior

git status succeeds with no issue:

Image

Output of submodule:

Image

Output of worktree list:

Image

Steps to reproduce 🕹

  1. setup git repository with submodules in ~/dots
  2. cd ~/dots
  3. git config core.worktree $HOME
  4. ln -fs ~/dots/.git ~/.git
  5. cd ..
  6. gix status (in $HOME)

If you wish to try it out, the process above is automated by my dotfiles install script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acknowledgedan issue is accepted as shortcoming to be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions