Commit 5e10b4a
committed
Make the pre-commit hook work in a git worktree
The devcontainer only mounts the worktree directory, so git inside the
container couldn't find the gitdir that the worktree's .git file points
at. Bind-mount the main repo's git dir at the same path when we're in a
worktree.1 parent 23f4f68 commit 5e10b4a
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
2 | 9 | | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
6 | 13 | | |
7 | | - | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | | - | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
| |||
0 commit comments