Commit cf53097
mingw_strbuf_realpath(): handle case of non existent last path component
git often requests `strbuf_realpath(path + "/.git")`, where "./git" does
not yet exist on disk.
This causes the following to happen:
1. `mingw_strbuf_realpath()` fails
2. Non-mingw `strbuf_realpath()` does the work
3. Result of `strbuf_realpath()` is slightly different, for example it
will not normalize the case of disk/folder names
4. `needs_work_tree_config()` becomes confused by these differences
5. clone adds `core.worktree` setting
This in turn causes various problems, for example:
1. Repository folder can no longer be renamed/moved without breaking it
2. Using the repository on WSL (Windows Subsystem for Linux) doesn't
work, because it has windows-style path saved
This fixes #2569
Co-Authored-By: Johannes Schindelin <[email protected]>
Signed-off-by: Alexandr Miloslavskiy <[email protected]>1 parent 545dac9 commit cf53097
2 files changed
+39
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
| 1296 | + | |
1296 | 1297 | | |
1297 | 1298 | | |
1298 | 1299 | | |
1299 | 1300 | | |
1300 | 1301 | | |
1301 | 1302 | | |
1302 | 1303 | | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1303 | 1328 | | |
1304 | 1329 | | |
1305 | 1330 | | |
| |||
1314 | 1339 | | |
1315 | 1340 | | |
1316 | 1341 | | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
1317 | 1349 | | |
1318 | 1350 | | |
1319 | 1351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
0 commit comments