devcontainers / devcontainers/cli

git worktree support

未关闭
#796 16 条评论 59 个 reaction 已指派 1 人 已被 @chrmarti 认领 在 GitHub 查看
feature-request
主要语言
TypeScript
星标
3k
派生
457
平均合并
13 小时 17 分钟
30 天内合并 PR
6

描述

If you try to open a project with a devcontainer that is actually a worktree, the started container does not work as expected.
In a worktree, `.git` is not a directory, but a file containing:

```
gitdir: /hostpath/to/real/git
```

If the container uses git commands, all those will fail with different error messages. Commits will not work, submodules will fail among other things.

## fixes
What could possible work is to read the gitdir value and add this directory as volume to the same name as specified in the `.git` file.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。