Re: [PATCH 11/14] t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Dec 15, 2010, 08:22 UTC
- Message-ID
- <4D087AC7.2090705@viscovery.net>
- In-Reply-To
- <4D07FE91.2090003@sunshineco.com>
Am 12/15/2010 0:32, schrieb Eric Sunshine:
Show 22 quoted lines
> On 12/14/2010 2:24 PM, Junio C Hamano wrote: >> Ramsay Jones<ramsay@ramsay1.demon.co.uk> writes: >>> The test using the conflict_hunks helper function (test 9) fails >>> on cygwin, since sed (by default) throws away the CR from CRLF >>> line endings. This behaviour is undesirable, since the validation >>> code expects the CRLF line-ending to be present. In order to fix >>> the problem we pass the -b (--binary) option to sed, using the >>> SED_OPTIONS variable. We use the SED_STRIPS_CR prerequisite in the >>> conditional initialisation of SED_OPTIONS. >>> >>> Signed-off-by: Ramsay Jones<ramsay@ramsay1.demon.co.uk> >>> --- >>> >>> Note that this test does not fail on MinGW, but I don't >>> really know why, given commit ca02ad3... ahem ;-) >> >> Ahem, indeed. Why? > > t3032 does indeed fail on MinGW, and was fixed in the msysgit port by [1], > but was subsequently "lost" when msysgit was rebased onto junio/next [2] > which did not have that test. Consequently, the fix never made it into the > mainline git source.
Sorry, but on MinGW, I only need the GREP_OPTIONS part of that fix, but not the SED_OPTIONS. It's also mysterious for me.
OTOH, the fix in ca02ad3 that applies to t6038, does not work for me as is because my sed does not understand -b; it needs --nocr. Maybe it is the sed version that makes the difference?
D:\Src\mingw-git\t>sed --version GNU sed version 3.02 ...
-- Hannes