Currently, if I try to use this extension in a worktree, it will error with
This is the same error as #23 , but it's happening for a different reason, so I thought it makes sense to open a separate issue.
The problem is that, in a git worktree, .git is a text file like this:
gitdir: <path to base repo>
so any code that assumes that .git is a directory will break.
Reproduction steps
mkdir worktree-test
cd worktree-test
# create 'worktree-test/one'
git clone git@github.com:lubieowoce/copy-github-url-test-repo.git one
cd one
# create 'worktree-test/two'
git worktree add -b test-branch ../two
in one, "copy github url" will work as expected. in two, it will show an error instead.
Currently, if I try to use this extension in a worktree, it will error with
This is the same error as #23 , but it's happening for a different reason, so I thought it makes sense to open a separate issue.
The problem is that, in a git worktree,
.gitis a text file like this:so any code that assumes that
.gitis a directory will break.Reproduction steps
in
one, "copy github url" will work as expected. intwo, it will show an error instead.