Skip to content

Commit

Permalink
fixup! Add functionality for converting UNIX paths in arguments and e…
Browse files Browse the repository at this point in the history
…nvironment variables to Windows form for native Win32 applications.

This skips posix-to-windows conversion when '::' is seen: The substring
'::' most often found in an IPv6 address, never in a path (and only in
bogus path lists that contain empty elements).

This addresses the expectations of the following test cases in the test
suite of https://github.com/git/git/tree/v2.43.0:

-t0060.197 test_submodule_relative_url: (null) helper:://hostname/repo ../subrepo => helper:://hostname/subrepo
-t0060.198 test_submodule_relative_url: (null) helper:://hostname/repo ../../subrepo => helper:://subrepo
-t0060.199 test_submodule_relative_url: (null) helper:://hostname/repo ../../../subrepo => helper::/subrepo
-t0060.200 test_submodule_relative_url: (null) helper:://hostname/repo ../../../../subrepo => helper::subrepo
-t0060.201 test_submodule_relative_url: (null) helper:://hostname/repo ../../../../../subrepo => helper:subrepo
-t0060.202 test_submodule_relative_url: (null) helper:://hostname/repo ../../../../../../subrepo => .:subrepo
-t5801.2 cloning from local repo
-t5801.4 pulling from local repo
-t5801.5 pushing to local repo
-t5801.6 fetch new branch
-t5801.7 fetch multiple branches
-t5801.8 push when remote has extra refs
-t5801.9 push new branch by name
-t5801.10 push new branch with old:new refspec
-t5801.11 push new branch with HEAD:new refspec
-t5801.12 push delete branch
-t5801.13 forced push
-t5801.14 cloning without refspec
-t5801.15 pulling without refspecs
-t5801.16 pushing without refspecs
-t5801.17 pulling without marks
-t5801.19 push all with existing object
-t5801.20 push ref with existing object
-t5801.23 push update refs
-t5801.24 push update refs disabled by no-private-update
-t5801.25 push update refs failure
-t5801.26 proper failure checks for fetching
-t5801.27 proper failure checks for pushing
-t5801.28 push messages
-t5801.29 fetch HEAD
-t5801.30 fetch url
-t5801.31 fetch tag
-t7400.80 ../subrepo works with helper URL- helper:://hostname/repo

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho authored and lazka committed Dec 19, 2023
1 parent 6ed5a42 commit c94cf81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions winsup/cygwin/msys2_path_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,11 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
if (it + 1 < end && it[1] == '~')
goto skip_p2w;
break;
case ':':
// Avoid mangling IPv6 addresses
if (it + 1 < end && it[1] == ':')
goto skip_p2w;
break;
}
++it;
}
Expand Down

0 comments on commit c94cf81

Please sign in to comment.