Re: [PATCH] t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables
- From
Jeff King <peff@peff.net>
- Date
- Nov 11, 2016, 18:16 UTC
- Message-ID
- <20161111181658.bwclcxedsrs4wcu6@sigill.intra.peff.net>
- In-Reply-To
- <2b69d098-92ef-77b0-367a-516e9edbe257@kdbg.org>
On Fri, Nov 11, 2016 at 06:31:48PM +0100, Johannes Sixt wrote:
Show 11 quoted lines
> We have to use $PWD instead of $(pwd) because on Windows the latter > would add a C: style path to bash's Unix-style $PATH variable, which > becomes confused by the colon after the drive letter. ($PWD is a > Unix-style path.) > > In the case of GIT_ALTERNATE_OBJECT_DIRECTORIES, bash on Windows > assembles a Unix-style path list with the colon as separators. It > converts the value to a Windows-style path list with the semicolon as > path separator when it forwards the variable to git.exe. The same > confusion happens when bash's original value is contaminated with > Windows style paths.
So on reading your original I wondered why you did not need to use the ";", and that explains it. But wow, it's subtle.
I don't know what people typically write in the wild, and if it's worth actually testing explicitly the ";" case. I'll leave that to Windows people to debate.
-Peff