Re: [PATCH jk/checkout-attribute-lookup] t2003: work around path mangling issue on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 3/20/2013 18:10, schrieb Junio C Hamano:
> Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:
> 
>> From: Johannes Sixt <j6t@xxxxxxxx>
>>
>> MSYS bash considers the part "/g" in the sed expression "s/./=/g" as an
>> absolute path after an assignment, and mangles it to a C:/something
>> string. Do not attract bash's attention by avoiding the equals sign.
> 
> If this breakage is about path mangling, I suspect it may be cleaner
> to work it around by not using / as the pattern separator, e.g.
> 
> 	sed -e s!.!=!g

Half a year down the road you'd scratch your head why you were not using
'/' as separator. As the replacement character is irrelevant here, it's
better to exchange that. Therefore, I still prefer my version.

> Or perhaps use SHELL_PATH to point at a more reasonable
> implementation of shell that does not have such an idiocy?

Well, POSIX and DOS paths look inherently different, particularly absolute
paths. You can't write a reasonably portable shell script if the shell
doesn't help in some way.

Not to mention that the supply of POSIX shells on Windows is inherently
scarce.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]