From: Eric Sunshine <sunshine@sunshineco.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Ramsay Jones <ramsay@ramsay1.demon.co.uk>,
GIT Mailing-list <git@vger.kernel.org>,
Pat Thoyts <patthoyts@gmail.com>
Subject: Re: [PATCH 11/14] t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
Date: Wed, 15 Dec 2010 04:30:30 -0500 [thread overview]
Message-ID: <4D088AB6.5090501@sunshineco.com> (raw)
In-Reply-To: <4D087AC7.2090705@viscovery.net>
On 12/15/2010 3:22 AM, Johannes Sixt wrote:
> Am 12/15/2010 0:32, schrieb Eric Sunshine:
>> 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
Failure of t3032 was reported by Pat Thoyts [1] when preparing for the
v1.7.3 release. The problem was diagnosed and patched via [2] under the
standard msysgit netinstall [3] environment. From commit message [2],
GREP_OPTIONS and SED_OPTIONS were applied to resolve distinct cases of
line-terminator "corruption" (t3032.4-t3032.8 and t3032.9, respectively)
within that environment at the time the patch was prepared.
Your tool versions may indeed not be compatible with those of the
netinstall environment [3]:
$ sed --version
GNU sed version 4.2.1
Unfortunately, the old --nocr is not recognized by modern GNU sed:
$ sed --nocr
sed: unrecognized option `--nocr'
[1]:
http://groups.google.com/group/msysgit/browse_thread/thread/70110298ae72caea/a39b121bb0feccf4?lnk=gst&q=t3032#a39b121bb0feccf4
[2]:
http://groups.google.com/group/msysgit/browse_thread/thread/587d32ee034b0cbe/dca93dc6ad755012#dca93dc6ad755012
[3]: http://code.google.com/p/msysgit/downloads/list
[msysGit-netinstall-1.7.3.1-preview20101002.exe]
-- ES
next prev parent reply other threads:[~2010-12-15 9:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-14 18:34 [PATCH 11/14] t3032-*.sh: Pass the -b (--binary) option to sed on cygwin Ramsay Jones
2010-12-14 19:24 ` Junio C Hamano
2010-12-14 23:32 ` Eric Sunshine
2010-12-15 8:22 ` Johannes Sixt
2010-12-15 9:30 ` Eric Sunshine [this message]
2010-12-16 21:19 ` Ramsay Jones
2010-12-17 7:34 ` Johannes Sixt
2010-12-18 20:16 ` Ramsay Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D088AB6.5090501@sunshineco.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=patthoyts@gmail.com \
--cc=ramsay@ramsay1.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).