Re: [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508
From: Junio C Hamano <hidden>
Date: 2016-06-15 23:07:53
Eric Sunshine [off-list ref] writes:
On Sun, Jan 24, 2016 at 9:03 PM, Junio C Hamano [off-list ref] wrote:quoted
The new test hardcodes and promises such an incompatible behaviour, i.e. a request to create "@//b" results in "@/b" created, only to users on MINGW, fracturing the expectations of the Git userbase.What the commit message doesn't explain is that ... ... This commit message is trying to say that MSYS shell undesirably sees @/fish as an absolute path, thus tries translating it to a Windows path, such as @C:\fish. The only way to suppress this unwanted translation is to manually double the slash, hence the patch makes the test use @//fish which, when finally seen by the program, is just @/fish, as was intended in the first place. So, doubling the slash on MINGW is not promising incompatible behavior for MINGW users; it's just working around unwanted path translation of the shell.
Ah, OK, thanks for clarifying it. Presumably you would then use "checkout @//b" to switch to it, and "log @//b" to look at its hsitory. When you read "git branch" output and see "@/b" in it, you would also not complain thinking "oh I thought I created "@//b", not with a single branch!". Then no issues on allowing "checkout -b @//b" to create a branch "@/b" from me. Thanks.