From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
Christopher Li <sparse@chrisli.org>,
Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH 4/5] test-suite: Add -b option to ignore CR at eol on MinGW
Date: Wed, 22 May 2013 22:19:49 +0100 [thread overview]
Message-ID: <519D3675.8060403@ramsay1.demon.co.uk> (raw)
In-Reply-To: <20130521214607.GB11463@jtriplet-mobl1>
Josh Triplett wrote:
> On Tue, May 21, 2013 at 11:27:00PM +0200, Johannes Berg wrote:
>> On Tue, 2013-05-21 at 14:16 -0700, Josh Triplett wrote:
>>> On Tue, May 21, 2013 at 08:18:21PM +0100, Ramsay Jones wrote:
>>>> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
>>>
>>> -b doesn't just ignore CR at end of line; it would also ignore changes
>>> in the amount of whitespace elsewhere on the line. You might consider
>>> piping the input that has CRs through sed before storing it, to delete
>>> the CR at end of line before comparing, instead.
>>
>> Or just use --strip-trailing-cr, no? Or maybe that's not available?
>
> Nice, I didn't know about that one. Yes, if MinGW's diff has that, by
> all means use it.
Heh, that was the first thing I tried, but it doesn't work:
$ diff --strip-trailing-cr sparse.c{~,}
diff: unrecognized option `--strip-trailing-cr'
diff: Try `diff --help' for more information.
$ diff --version
diff - GNU diffutils version 2.7
$
It works just fine on cygwin and Linux, but the diff versions are
newer there, for example on cygwin:
$ diff --version
diff (GNU diffutils) 2.8.7
Written by Paul Eggert, Mike Haertel, David Hayes,
Richard Stallman, and Len Tower.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$
Hmm, does it really matter that it would miss whitespace changes
elsewhere in the line? (Ah, maybe some of the preprocessor tests?)
I think I would prefer to go back to the original _setmode() patch
than to mess with sed. ;-)
[Also, this MinGW is the one that came from the msysgit installer from
a couple of years ago. Maybe it has been updated. uname shows that the
MinGW I'm using was dated Feb 2010. dunno.]
ATB,
Ramsay Jones
prev parent reply other threads:[~2013-05-22 22:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 19:18 [PATCH 4/5] test-suite: Add -b option to ignore CR at eol on MinGW Ramsay Jones
2013-05-21 21:16 ` Josh Triplett
2013-05-21 21:27 ` Johannes Berg
2013-05-21 21:46 ` Josh Triplett
2013-05-22 21:19 ` Ramsay Jones [this message]
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=519D3675.8060403@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=johannes@sipsolutions.net \
--cc=josh@joshtriplett.org \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
/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).