Commit e94ccaf
committed
support relative worktree paths (git 2.48+ worktree.useRelativePaths)
git 2.48 introduced the `worktree.useRelativePaths` config option,
which causes `git worktree add` to write a relative `gitdir` into the
worktree's `.git` file.
Resolve the relative `gitdir` against the worktree directory before
normalizing it. Absolute paths are unaffected because `os.path.join`
ignores the prefix when joined with an absolute path.1 parent c334167 commit e94ccaf
2 files changed
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
1097 | | - | |
| 1097 | + | |
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
| |||
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
1109 | | - | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
1110 | 1114 | | |
1111 | 1115 | | |
1112 | 1116 | | |
| |||
1124 | 1128 | | |
1125 | 1129 | | |
1126 | 1130 | | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1127 | 1140 | | |
1128 | 1141 | | |
1129 | 1142 | | |
| |||
0 commit comments