jesseduffield / jesseduffield/lazygit

Lazygit crashes on worktree with bare repo

Open
#3,100 25 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

I have a repo that I cloned with

```
git clone --bare git@github.com:example/example.git example
```

And added the main branch as a worktree

```
git worktree add main
```

Now, if I go into the `main` directory and I tree to run lazygit it just crashes after opening for like half a second.
I cannot get the full panic because it also leaves my terminal in a messy state.

Lazygit version: `commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=linux, arch=amd64, git version=2.34.1`

(thanks for all the work that went into lazygit, been loving it for a while now)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.