From: Johannes Sixt <j.sixt@viscovery.net>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
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 08:34:37 +0200 [thread overview]
Message-ID: <483A59FD.6020906@viscovery.net> (raw)
In-Reply-To: <fcaeb9bf0805252115q60f784aax6b1f267c476960b4@mail.gmail.com>
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.
-- Hannes
next prev parent reply other threads:[~2008-05-26 6:36 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 [this message]
2008-05-26 8:04 ` Nguyen Thai Ngoc Duy
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=483A59FD.6020906@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=newsletter@dirk.my1.cc \
--cc=pclouds@gmail.com \
/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).