{"thread":{"id":"19850","subject":"Bug: \"LF will be replaced by CRLF\" warning duplicated two (or three) times","startedAt":"2009-06-18T09:17:14Z","lastAt":"2009-06-18T09:17:14Z","messageCount":1,"participants":["Eric Raible"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116550","messageId":"loom.20090618T084545-442@post.gmane.org","threadId":"19850","inReplyTo":null,"subject":"Bug: \"LF will be replaced by CRLF\" warning duplicated two (or three) times","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2009-06-18T09:17:14Z","receivedAt":"2009-06-18T09:17:14Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"A single \"LF will be replaced by CRLF\" message is expected in certain cases.\nBut two warnings per file are produced with git-diff --patch-with-stat.\nPosted here rather than to the msysgit list b.c. I'm guessing it's not\nmsysgit-specific.\n\n$ git --version\ngit version 1.6.3.msysgit.0\n$ mkdir auto-crlf-bug\n$ cd auto-crlf-bug/\n$ git init\nInitialized empty Git repository in d:/auto-crlf-bug/.git/\n$ git config core.autocrlf\ntrue\n$ touch file42\n$ git add file42\n$ git commit -m initial\n[master (root-commit) 6c22784] initial\n 0 files changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 file42\n$ echo something > file42\n$ git diff\ndiff --git a/file42 b/file42\nindex e69de29..deba01f 100644\n--- a/file42\n+++ b/file42\n@@ -0,0 +1 @@\n+something\nwarning: LF will be replaced by CRLF in file42\n$ git diff --patch-with-stat\n file42 |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/file42 b/file42\nindex e69de29..deba01f 100644\n--- a/file42\n+++ b/file42\n@@ -0,0 +1 @@\n+something\nwarning: LF will be replaced by CRLF in file42\nwarning: LF will be replaced by CRLF in file42\n$\n\n\nIt's even possible to trigger three identical warnings:\n$ git add -p\nwarning: LF will be replaced by CRLF in file42\nwarning: LF will be replaced by CRLF in file42\nwarning: LF will be replaced by CRLF in file42\ndiff --git a/file42 b/file42\nindex e69de29..deba01f 100644\n--- a/file42\n+++ b/file42\n@@ -0,0 +1 @@\n+something\nStage this hunk [y,n,q,a,d,/,e,?]? q\n$\n\nThis is obviously not a show-stopper, but I thought it worth reporting anyway.\n\n- Eric\n"}]}