From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Johannes Sixt" <j.sixt@viscovery.net>
Cc: "Dirk Süsserott" <newsletter@dirk.my1.cc>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: git-diff cr/nl files on linux
Date: Mon, 26 May 2008 15:04:45 +0700 [thread overview]
Message-ID: <fcaeb9bf0805260104p72828318p202d3bceaa676daa@mail.gmail.com> (raw)
In-Reply-To: <483A59FD.6020906@viscovery.net>
On Mon, May 26, 2008 at 1:34 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Nguyen Thai Ngoc Duy schrieb:
>> On Sat, May 24, 2008 at 8:01 PM, Dirk Süsserott <newsletter@dirk.my1.cc> wrote:
>>> Nguyen Thai Ngoc Duy schrieb:
>>>> Hi,
>>>>
>>>> Is there any way that can make git-diff show cr/nl ending files on
>>>> linux without ^M at the end?
>>>>
>>>> Thanks
>>>>
>>> What about 'git diff -w'? It drops any whitespace changes, including ^M's.
>>> Not sure whether that is what you meant.
>>
>> That won't help. Here is a snippet of what I see:
>>
>> diff --git a/abc.c b/abc.c
>> index 064a769..647b9ae 100644
>> --- a/abc.c
>> +++ b/abc.c
>> @@ -859,7 +859,10 @@ int def
>> )
>> {
>> FAST int asdsa;
>> - FAST int dsdsad;
>> + FAST int dsadadd; /* ERROR also means AASAS */^M
>> +#ifndef JHASHJJH^M
>> + struct sdddd dasdada;^M
>> +#endif^M
>> union sddd asdsdad;
>> FAST STATUS dsadadad;
>> unsigned int sdadadad = 0;
>>
>> With color turning off, it does not show ^M so probably something to
>> do with the coloring. less is at version 394.
>
> less does not show \r if it comes right before \n. But with diff-coloring
> turned on, the 'reset color' sequence is inserted between \r and \n; now
> less shows ^M for the \r because it's not next to the \n anymore.
>
Right. And setting core.whitespace = cr-at-eol fixes it (although
difficult to find). Thank you all.
> -- Hannes
>
--
Duy
prev parent reply other threads:[~2008-05-26 8:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-24 12:54 git-diff cr/nl files on linux Nguyen Thai Ngoc Duy
2008-05-24 13:01 ` Dirk Süsserott
2008-05-26 4:15 ` Nguyen Thai Ngoc Duy
2008-05-26 4:37 ` Junio C Hamano
2008-05-26 6:34 ` Johannes Sixt
2008-05-26 8:04 ` Nguyen Thai Ngoc Duy [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=fcaeb9bf0805260104p72828318p202d3bceaa676daa@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=newsletter@dirk.my1.cc \
/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).