Commit 40e48c7
mingw: do resolve symlinks in
As pointed out in #1676,
the `git rev-parse --is-inside-work-tree` command currently fails when
the current directory's path contains symbolic links.
The underlying reason for this bug is that `getcwd()` is supposed to
resolve symbolic links, but our `mingw_getcwd()` implementation did not.
We do have all the building blocks for that, though: the
`GetFinalPathByHandleW()` function will resolve symbolic links. However,
we only called that function if `GetLongPathNameW()` failed, for
historical reasons: the latter function was supported for a long time,
but the former API function was introduced only with Windows Vista, and
we used to support also Windows XP. With that support having been
dropped, we are free to call the symbolic link-resolving function right
away.
Signed-off-by: Johannes Schindelin <[email protected]>getcwd()
1 parent cf5666f commit 40e48c7
1 file changed
+7
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1235 | 1235 | | |
1236 | 1236 | | |
1237 | 1237 | | |
| 1238 | + | |
1238 | 1239 | | |
1239 | 1240 | | |
1240 | 1241 | | |
1241 | 1242 | | |
1242 | 1243 | | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
1250 | 1248 | | |
1251 | 1249 | | |
1252 | 1250 | | |
| |||
1255 | 1253 | | |
1256 | 1254 | | |
1257 | 1255 | | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
| 1256 | + | |
1261 | 1257 | | |
1262 | 1258 | | |
1263 | 1259 | | |
1264 | | - | |
| 1260 | + | |
1265 | 1261 | | |
1266 | 1262 | | |
1267 | 1263 | | |
| |||
0 commit comments