@@ -305,16 +305,17 @@ test_git_path GIT_COMMON_DIR=bar config bar/config
305
305
test_git_path GIT_COMMON_DIR=bar packed-refs bar/packed-refs
306
306
test_git_path GIT_COMMON_DIR=bar shallow bar/shallow
307
307
308
- # In the tests below, the distinction between $PWD and $(pwd) is important:
309
- # on Windows, $PWD is POSIX style (/c/foo), $(pwd) has drive letter (c:/foo).
308
+ # In the tests below, $(pwd) must be used because it is a native path on
309
+ # Windows and avoids MSYS's path mangling (which simplifies "foo/../bar" and
310
+ # strips the dot from trailing "/.").
310
311
311
312
test_submodule_relative_url " ../" " ../foo" " ../submodule" " ../../submodule"
312
313
test_submodule_relative_url " ../" " ../foo/bar" " ../submodule" " ../../foo/submodule"
313
314
test_submodule_relative_url " ../" " ../foo/submodule" " ../submodule" " ../../foo/submodule"
314
315
test_submodule_relative_url " ../" " ./foo" " ../submodule" " ../submodule"
315
316
test_submodule_relative_url " ../" " ./foo/bar" " ../submodule" " ../foo/submodule"
316
317
test_submodule_relative_url " ../../../" " ../foo/bar" " ../sub/a/b/c" " ../../../../foo/sub/a/b/c"
317
- test_submodule_relative_url " ../" " $PWD /addtest" " ../repo" " $( pwd) /repo"
318
+ test_submodule_relative_url " ../" " $( pwd ) /addtest" " ../repo" " $( pwd) /repo"
318
319
test_submodule_relative_url " ../" " foo/bar" " ../submodule" " ../foo/submodule"
319
320
test_submodule_relative_url " ../" " foo" " ../submodule" " ../submodule"
320
321
@@ -327,16 +328,16 @@ test_submodule_relative_url "(null)" "../foo" "../submodule" "../submodule"
327
328
test_submodule_relative_url " (null)" " ./foo/bar" " ../submodule" " foo/submodule"
328
329
test_submodule_relative_url " (null)" " ./foo" " ../submodule" " submodule"
329
330
test_submodule_relative_url " (null)" " //somewhere else/repo" " ../subrepo" " //somewhere else/subrepo"
330
- test_submodule_relative_url " (null)" " $PWD /subsuper_update_r" " ../subsubsuper_update_r" " $( pwd) /subsubsuper_update_r"
331
- test_submodule_relative_url " (null)" " $PWD /super_update_r2" " ../subsuper_update_r" " $( pwd) /subsuper_update_r"
332
- test_submodule_relative_url " (null)" " $PWD /." " ../." " $( pwd) /."
333
- test_submodule_relative_url " (null)" " $PWD " " ./." " $( pwd) /."
334
- test_submodule_relative_url " (null)" " $PWD /addtest" " ../repo" " $( pwd) /repo"
335
- test_submodule_relative_url " (null)" " $PWD " " ./å äö" " $( pwd) /å äö"
336
- test_submodule_relative_url " (null)" " $PWD /." " ../submodule" " $( pwd) /submodule"
337
- test_submodule_relative_url " (null)" " $PWD /submodule" " ../submodule" " $( pwd) /submodule"
338
- test_submodule_relative_url " (null)" " $PWD /home2/../remote" " ../bundle1" " $( pwd) /home2/../bundle1"
339
- test_submodule_relative_url " (null)" " $PWD /submodule_update_repo" " ./." " $( pwd) /submodule_update_repo/."
331
+ test_submodule_relative_url " (null)" " $( pwd ) /subsuper_update_r" " ../subsubsuper_update_r" " $( pwd) /subsubsuper_update_r"
332
+ test_submodule_relative_url " (null)" " $( pwd ) /super_update_r2" " ../subsuper_update_r" " $( pwd) /subsuper_update_r"
333
+ test_submodule_relative_url " (null)" " $( pwd ) /." " ../." " $( pwd) /."
334
+ test_submodule_relative_url " (null)" " $( pwd ) " " ./." " $( pwd) /."
335
+ test_submodule_relative_url " (null)" " $( pwd ) /addtest" " ../repo" " $( pwd) /repo"
336
+ test_submodule_relative_url " (null)" " $( pwd ) " " ./å äö" " $( pwd) /å äö"
337
+ test_submodule_relative_url " (null)" " $( pwd ) /." " ../submodule" " $( pwd) /submodule"
338
+ test_submodule_relative_url " (null)" " $( pwd ) /submodule" " ../submodule" " $( pwd) /submodule"
339
+ test_submodule_relative_url " (null)" " $( pwd ) /home2/../remote" " ../bundle1" " $( pwd) /home2/../bundle1"
340
+ test_submodule_relative_url " (null)" " $( pwd ) /submodule_update_repo" " ./." " $( pwd) /submodule_update_repo/."
340
341
test_submodule_relative_url " (null)" " file:///tmp/repo" " ../subrepo" " file:///tmp/subrepo"
341
342
test_submodule_relative_url " (null)" " foo/bar" " ../submodule" " foo/submodule"
342
343
test_submodule_relative_url " (null)" " foo" " ../submodule" " submodule"
0 commit comments