git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* BUG: CR marker ^M doesn't show up in '-' lines of diffs when the ending of the removed line is CR+LF
@ 2018-11-23 18:19 Frank Schäfer
  2018-11-23 21:47 ` Johannes Sixt
  0 siblings, 1 reply; 23+ messages in thread
From: Frank Schäfer @ 2018-11-23 18:19 UTC (permalink / raw)
  To: git

The CR marker ^M doesn't show up in '-' lines of diffs when the ending
of the removed line is CR+LF.
It shows up as expected in '-' lines when the ending of the removed line
is CR only.
It also always shows up as expected in '+' lines.

These are the diffs of the 6 possible line ending changes:

LF to CR+LF:
@@ -1,2 +1,2 @@
-aaa
+aaa^M
 bbb
 
CR+LF to LF:
@@ -1,2 +1,2 @@
-aaa            => BUG: should be -aaa^M
+aaa
 bbb

CR to CR+LF:
@@ -1 +1,2 @@
-aaa^Mbbb
+aaa^M
+bbb

CR+LF to CR:
@@ -1,2 +1 @@
-aaa            => BUG: should be -aaa^M
-bbb
+aaa^Mbbb

LF to CR:
@@ -1,2 +1 @@
-aaa
-bbb
+aaa^Mbbb

CR to LF:
@@ -1 +1,2 @@
-aaa^Mbbb
+aaa
+bbb

Tested with version 2.19.1.

Regards,
Frank Schäfer


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-12-06 18:41 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).