Re: [PATCH 13/19] mingw: outsmart MSYS2's path substitution in t1508
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 25, 2016, 18:50 UTC
- Message-ID
- <xmqqd1sph4so.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAPig+cQfbJUtqu2F497Usaz3Ysf-5-vQgtg-0y8qh+FUQ=HeTA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 15 quoted lines
> On Sun, Jan 24, 2016 at 9:03 PM, Junio C Hamano <gitster@pobox.com> wrote: >> 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.