zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.11k stars 102 forks source link

lab 0.23.0: `mr show -c' fails in git worktree #773

Closed github-cygwin closed 2 years ago

github-cygwin commented 2 years ago

Hi,

I just encountered the issue from the subject line. While lab mr show <MR#> works nicely in a worktree, lab mr show -c <MR#> fails with ERROR: config.go:364: open .git/lab/lab.toml: not a directory The reason is apparently that .git is a file in a worktree, rather than a directory. Looks like following the gitdir info in the worktree .git file is not implemented yet?

Corinna

bmeneg commented 2 years ago

Hi Corinna,

We already have the code for following the gitdir, but it isn't being used where it should. I'm going to submit a PR correcting it.