Commit 4e660b9
feat(git): add MSYS2/Cygwin path normalization
When running native Windows Neovim with Cygwin-based git, commands
like `rev-parse --show-toplevel` return Unix-style paths (e.g.
`/c/Users/...`) that Neovim cannot use. Detect this case and convert
via `cygpath --absolute --windows`. Only fires when `has('win32')` is
true and the path starts with `/`, so Linux/macOS users are unaffected.
Based on softvisio/diffview.nvim (commits a67c42d, 06232a8) and
upstream PR sindrets#574, with modifications: use `vim.trim()` instead of
manual newline stripping, add type annotations, use double quotes.1 parent ffc58f6 commit 4e660b9
1 file changed
+29
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
169 | 196 | | |
170 | 197 | | |
171 | 198 | | |
| |||
177 | 204 | | |
178 | 205 | | |
179 | 206 | | |
180 | | - | |
| 207 | + | |
181 | 208 | | |
182 | 209 | | |
183 | 210 | | |
| |||
279 | 306 | | |
280 | 307 | | |
281 | 308 | | |
282 | | - | |
| 309 | + | |
283 | 310 | | |
284 | 311 | | |
285 | 312 | | |
| |||
0 commit comments