git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: BUG: CR marker ^M doesn't show up in '-' lines of diffs when the ending of the removed line is CR+LF

From
FSFrank Schäfer <fschaefer.oss@googlemail.com>
Date
Dec 5, 2018, 19:43 UTC
Message-ID
<7796f0ac-d3db-68f9-89fa-9262d2187f57@googlemail.com>
In-Reply-To
<xmqqmupnh0lo.fsf@gitster-ct.c.googlers.com>
Am 03.12.18 um 02:15 schrieb Junio C Hamano:
Show 30 quoted lines
> Frank Schäfer <fschaefer.oss@googlemail.com> writes:
>
>> Hi Junio,
>>
>> Am 29.11.18 um 03:11 schrieb Junio C Hamano:
>> [...]
>>> This was misspoken a bit.  Let's revise it to
>>>
>>>  	When producing a colored output (not limited to whitespace
>>>  	error coloring of diff output) for contents that are not
>>>  	marked as eol=crlf (and other historical means), insert
>>>  	<RESET> before a CR that comes immediately before a LF.
>> You mean
>>      ...
>>      <RESET> *after* a CR that comes immediately before a LF."
>>
>> OK, AFAICS this produces the desired output in all cases if eol=lf.
> OK, yeah, I think I meant "after", i.e. ... CR <RESET> LF, in order
> to force CR to be separated from LF.
>
>> Now what about the case eol=crlf ?
> I have no strong opinions, other than that "LF in repository, CRLF
> in working tree" would make the issue go away (when it is solved for
> EOL=LF like the above, that is).
>
>> Keeping the current behavior of '-' lines is correct.
>> But shouldn't ^M now be suppressed in '+' lines for a consistent behavior ?
> If "LF in repository, CRLF in working tree" is done, there would not
> be ^M at the end of the line, not just for removed lines, but also
> for added lines, no?

Just to be sure that I'm not missing anything here: What's your definition of "LF in repository, CRLF in working tree" in terms of config parameters ?

Regards, Frank

Previous: Junio C HamanoNext: Junio C Hamano
Message 20 of 23 in “BUG: CR marker ^M doesn't show up in '-' lines of diffs when the ending of the removed line is CR+LF”
  1. Frank SchäferNov 23, 2018
  2. Johannes SixtNov 23, 2018
  3. Frank SchäferNov 24, 2018
  4. Torsten BögershausenNov 24, 2018
  5. Johannes SixtNov 24, 2018
  6. Frank SchäferNov 25, 2018
  7. Johannes SixtNov 25, 2018
  8. Junio C HamanoNov 26, 2018
  9. brian m. carlsonNov 25, 2018
  10. Johannes SixtNov 26, 2018
  11. Junio C HamanoNov 26, 2018
  12. Johannes SixtNov 27, 2018
  13. Frank SchäferNov 27, 2018
  14. Junio C HamanoNov 29, 2018
  15. Frank SchäferDec 2, 2018
  16. Johannes SixtDec 2, 2018
  17. Frank SchäferDec 5, 2018
  18. Johannes SixtDec 5, 2018
  19. Junio C HamanoDec 3, 2018
  20. Frank SchäferDec 5, 2018
  21. Junio C HamanoDec 6, 2018
  22. Frank SchäferDec 6, 2018
  23. Frank SchäferNov 27, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.