git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: "Frank Schäfer" <fschaefer.oss@googlemail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	git@vger.kernel.org
Subject: Re: BUG: CR marker ^M doesn't show up in '-' lines of diffs when the ending of the removed line is CR+LF
Date: Wed, 5 Dec 2018 22:31:21 +0100	[thread overview]
Message-ID: <337ed78c-afd5-24ab-709b-ff74ee6b90ac@kdbg.org> (raw)
In-Reply-To: <de3bd8e1-cdd7-5fcf-0912-a216cc8cb3e9@googlemail.com>

Am 05.12.18 um 20:29 schrieb Frank Schäfer:
> 
> Am 02.12.18 um 22:22 schrieb Johannes Sixt:
>> Am 02.12.18 um 20:31 schrieb Frank Schäfer:
>>> With other words:
>>> "If CR comes immediately before a LF, do the following with *all* lines:
>>> <RESET> after the CR if eol=lf but do not <RESET> after the CR if
>>> eol=crlf."
>>
>> Why? It is the pager's duty to highlight CR, IMO. If it doesn't, but
>> the user wants to see them, then they are using the wrong pager or the
>> wrong pager settings.
> AFAIU Junios explanation it's not the pagers fault.

Then Junio and I are in disagreement. IMO, Git does not have to be more 
clever than the pager when it comes to presentation of text.

>> As far as I am concerned, I do not have any of my files marked as
>> eol=crlf, but I do *not* want to see ^M in the pager. I.e., having git
>> insert <RESET> between CR and LF would do the wrong thing for me.
>>
> But doing the same thing in added lines is doing the right thing for you ?

Yes, I think so. As long as I'm not telling Git that my files are CRLF 
when they actual are, then the CR before LF is a whitespace error. 
Nevertheless, I do *NOT* want Git to outwit my pager by inserting 
<RESET> between CR and LF all the time so that it is forced to treat the 
lone CR like a control character that is to be made visible.

> Or are you suggesting to fix the behavior of added lines instead ?
> In any case, inconsistent behavior is not what we want.

I'm suggesting that users who knowingly store CRLF files in the 
database, but do not want to see ^M in added lines have to use 
whitespace=cr-at-eol and that's all. I do not see inconsistency.

-- Hannes

  reply	other threads:[~2018-12-05 21:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23 18:19 BUG: CR marker ^M doesn't show up in '-' lines of diffs when the ending of the removed line is CR+LF Frank Schäfer
2018-11-23 21:47 ` Johannes Sixt
2018-11-24 14:51   ` Frank Schäfer
2018-11-24 15:25     ` Torsten Bögershausen
2018-11-24 22:07     ` Johannes Sixt
2018-11-25 14:03       ` Frank Schäfer
2018-11-25 21:39         ` Johannes Sixt
2018-11-26  4:02           ` Junio C Hamano
     [not found]           ` <xmqqzhtwzghr.fsf@gitster-ct.c.googlers.com>
2018-11-26 19:49             ` Johannes Sixt
2018-11-26 23:31               ` Junio C Hamano
2018-11-27 18:15                 ` Johannes Sixt
2018-11-27 20:09                   ` Frank Schäfer
2018-11-29  2:11                   ` Junio C Hamano
2018-12-02 19:31                     ` Frank Schäfer
2018-12-02 21:22                       ` Johannes Sixt
2018-12-05 19:29                         ` Frank Schäfer
2018-12-05 21:31                           ` Johannes Sixt [this message]
2018-12-03  1:15                       ` Junio C Hamano
2018-12-05 19:43                         ` Frank Schäfer
2018-12-06  0:58                           ` Junio C Hamano
2018-12-06 18:42                             ` Frank Schäfer
2018-11-27 20:06                 ` Frank Schäfer
2018-11-25 23:50         ` brian m. carlson

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=337ed78c-afd5-24ab-709b-ff74ee6b90ac@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=fschaefer.oss@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).