{"thread":{"id":"32697","subject":"Bug in EOL conversion?","startedAt":"2013-01-23T02:44:23Z","lastAt":"2013-01-23T23:04:38Z","messageCount":6,"participants":["Stefan Norgren","Philip Oakley","Erik Faye-Lund","Thomas Rast","Pēteris Kļaviņš"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"207550","messageId":"CANrZfmGXtKcB+i_xhNJELftRc1pC2TJKKhOieHm=5Qkni9OKrA@mail.gmail.com","threadId":"32697","inReplyTo":null,"subject":"Bug in EOL conversion?","fromName":"Stefan Norgren","fromEmail":"stefan.norgren@gmail.com","sentAt":"2013-01-23T02:44:23Z","receivedAt":"2013-01-23T02:44:23Z","isPatch":false,"sender":{"key":"stefan.norgren@gmail.com","avatar":null},"body":"Hi,\n\nThe EOL conversion does not behave as indicated by output message from\nadd and commit. Here is my test case executed on Windows 7 64 bit.\n\n\n$ git --version\ngit version 1.8.0.msysgit.0\n$ which git\n/cygdrive/c/Program Files (x86)/Git/cmd/git\n$ git config --list\ncore.symlinks=false\ncore.autocrlf=true\ncolor.diff=auto\ncolor.status=auto\ncolor.branch=auto\ncolor.interactive=true\npack.packsizelimit=2g\nhelp.format=html\nhttp.sslcainfo=/bin/curl-ca-bundle.crt\nsendemail.smtpserver=/bin/msmtp.exe\ndiff.astextplain.textconv=astextplain\nrebase.autosquash=true\nuser.name=Stefan\nuser.email=stefan@---.com\ncore.repositoryformatversion=0\ncore.filemode=false\ncore.bare=false\ncore.logallrefupdates=true\ncore.symlinks=false\ncore.ignorecase=true\ncore.hidedotfiles=dotGitOnly\n\n-- Note core.autocrlf=true.\n-- Created withcrlf.txt with one character and one CRLF line feed.\nFile size 3 bytes.\n-- Created withlf.txt with one character and one LF line feed. File\nsize 2 bytes.\n-- Now let's init repository.\n\n$ git init\nInitialized empty Git repository in D:/Dev/workspaces/gittest/.git/\n$ ls -la\ntotal 10\nd---------+ 1 Stefan None 0 Jan 23 02:12 .\nd---------+ 1 Stefan None 0 Jan 23 02:10 ..\nd---------+ 1 Stefan None 0 Jan 23 02:13 .git\n----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt\n----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt\n\n-- Note no .gitattributes file that will affect EOL conversion.\n\n$ ls -la .git/info/\ntotal 5\nd---------+ 1 Stefan None   0 Jan 23 02:12 .\nd---------+ 1 Stefan None   0 Jan 23 02:13 ..\n----------+ 1 Stefan None 240 Jan 23 02:12 exclude\n\n-- Note no attribute file in .git/info/ that will affect EOL conversion.\n\n$ git add *\nwarning: LF will be replaced by CRLF in withlf.txt.\nThe file will have its original line endings in your working directory.\n$ git commit -m 'Testing EOL'\n[master (root-commit) 9a0b2f5] Testing EOL\n 2 files changed, 2 insertions(+)\n create mode 100644 withcrlf.txt\n create mode 100644 withlf.txt\nwarning: LF will be replaced by CRLF in withlf.txt.\nThe file will have its original line endings in your working directory.\n$ ls -la\ntotal 10\nd---------+ 1 Stefan None 0 Jan 23 02:12 .\nd---------+ 1 Stefan None 0 Jan 23 02:10 ..\nd---------+ 1 Stefan None 0 Jan 23 02:22 .git\n----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt\n----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt\n\n-- So no changes (see file size) to files in working directory. This\nis expected and according to output warning from add and commit.\n\n-- Now lets look in the repository\n\n$ git ls-tree -l HEAD withcrlf.txt\n100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d       2    withcrlf.txt\n$ git ls-tree -l HEAD withlf.txt\n100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d       2    withlf.txt\n\n-- Note that size of withlf.txt is 2 in repository indicating that LF\nwas not replaced by CRLF in withlf.txt as indicated in output from add\nand commit. Also note that size of withcrlf.txt is also 2 in\nrepository so it looks like CRLF was replaced by LF in withcrlf.txt.\nTo verify I will delete the files from working directory, turn off EOL\nconversion, checkout files and look at file endings in the working\ndirectory.\n\n$ rm with*\n$ ls -la\ntotal 8\nd---------+ 1 Stefan None 0 Jan 23 02:31 .\nd---------+ 1 Stefan None 0 Jan 23 02:10 ..\nd---------+ 1 Stefan None 0 Jan 23 02:22 .git\n$ git status\n# On branch master\n# Changes not staged for commit:\n#   (use \"git add/rm <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#\n#       deleted:    withcrlf.txt\n#       deleted:    withlf.txt\n#\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\n$ git config --global core.autocrlf false\n$ git config --global core.autocrlf\nfalse\n$ git checkout -- with*\n$ ls -la\ntotal 10\nd---------+ 1 Stefan None 0 Jan 23 02:38 .\nd---------+ 1 Stefan None 0 Jan 23 02:10 ..\nd---------+ 1 Stefan None 0 Jan 23 02:38 .git\n----------+ 1 Stefan None 2 Jan 23 02:38 withcrlf.txt\n----------+ 1 Stefan None 2 Jan 23 02:38 withlf.txt\n\n-- Both files in working directory files now have LF line endings\nconfirming that files in repository have LF file endings. Either the\noutput message of add and commit is wrong or the behavior of the EOL\nconversion is wrong... or... have I missed something...?\n\n   /Stefan\n"},{"id":"207640","messageId":"063ABD39C46D492391698E400A7D1FA9@PhilipOakley","threadId":"32697","inReplyTo":"CANrZfmGXtKcB+i_xhNJELftRc1pC2TJKKhOieHm=5Qkni9OKrA@mail.gmail.com","subject":"Re: Bug in EOL conversion?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2013-01-23T21:25:04Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"The msysgit list msysgit@googlegroups.com may be a better place for \nthis.\n\nIt is likely that you have a windows specific EOL conversion set within \nthe wider config's (i.e.  --system, --global). You may have \ncore.safecrlf set which does a round trip test so tests the conversion \nboth ways.\n\nThe normal canonical line ending choice is LF in the repo.\n\nI don't have a W7 install to compare against.\n\nPhilip\n\n----- Original Message ----- \nFrom: \"Stefan Norgren\" <stefan.norgren@gmail.com>\nTo: <git@vger.kernel.org>\nSent: Wednesday, January 23, 2013 2:44 AM\nSubject: Bug in EOL conversion?\n\n\n> Hi,\n>\n> The EOL conversion does not behave as indicated by output message from\n> add and commit. Here is my test case executed on Windows 7 64 bit.\n>\n>\n> $ git --version\n> git version 1.8.0.msysgit.0\n> $ which git\n> /cygdrive/c/Program Files (x86)/Git/cmd/git\n> $ git config --list\n> core.symlinks=false\n> core.autocrlf=true\n> color.diff=auto\n> color.status=auto\n> color.branch=auto\n> color.interactive=true\n> pack.packsizelimit=2g\n> help.format=html\n> http.sslcainfo=/bin/curl-ca-bundle.crt\n> sendemail.smtpserver=/bin/msmtp.exe\n> diff.astextplain.textconv=astextplain\n> rebase.autosquash=true\n> user.name=Stefan\n> user.email=stefan@---.com\n> core.repositoryformatversion=0\n> core.filemode=false\n> core.bare=false\n> core.logallrefupdates=true\n> core.symlinks=false\n> core.ignorecase=true\n> core.hidedotfiles=dotGitOnly\n>\n> -- Note core.autocrlf=true.\n> -- Created withcrlf.txt with one character and one CRLF line feed.\n> File size 3 bytes.\n> -- Created withlf.txt with one character and one LF line feed. File\n> size 2 bytes.\n> -- Now let's init repository.\n>\n> $ git init\n> Initialized empty Git repository in D:/Dev/workspaces/gittest/.git/\n> $ ls -la\n> total 10\n> d---------+ 1 Stefan None 0 Jan 23 02:12 .\n> d---------+ 1 Stefan None 0 Jan 23 02:10 ..\n> d---------+ 1 Stefan None 0 Jan 23 02:13 .git\n> ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt\n> ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt\n>\n> -- Note no .gitattributes file that will affect EOL conversion.\n>\n> $ ls -la .git/info/\n> total 5\n> d---------+ 1 Stefan None   0 Jan 23 02:12 .\n> d---------+ 1 Stefan None   0 Jan 23 02:13 ..\n> ----------+ 1 Stefan None 240 Jan 23 02:12 exclude\n>\n> -- Note no attribute file in .git/info/ that will affect EOL \n> conversion.\n>\n> $ git add *\n> warning: LF will be replaced by CRLF in withlf.txt.\n> The file will have its original line endings in your working \n> directory.\n> $ git commit -m 'Testing EOL'\n> [master (root-commit) 9a0b2f5] Testing EOL\n> 2 files changed, 2 insertions(+)\n> create mode 100644 withcrlf.txt\n> create mode 100644 withlf.txt\n> warning: LF will be replaced by CRLF in withlf.txt.\n> The file will have its original line endings in your working \n> directory.\n> $ ls -la\n> total 10\n> d---------+ 1 Stefan None 0 Jan 23 02:12 .\n> d---------+ 1 Stefan None 0 Jan 23 02:10 ..\n> d---------+ 1 Stefan None 0 Jan 23 02:22 .git\n> ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt\n> ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt\n>\n> -- So no changes (see file size) to files in working directory. This\n> is expected and according to output warning from add and commit.\n>\n> -- Now lets look in the repository\n>\n> $ git ls-tree -l HEAD withcrlf.txt\n> 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d       2 \n> withcrlf.txt\n> $ git ls-tree -l HEAD withlf.txt\n> 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d       2 \n> withlf.txt\n>\n> -- Note that size of withlf.txt is 2 in repository indicating that LF\n> was not replaced by CRLF in withlf.txt as indicated in output from add\n> and commit. Also note that size of withcrlf.txt is also 2 in\n> repository so it looks like CRLF was replaced by LF in withcrlf.txt.\n> To verify I will delete the files from working directory, turn off EOL\n> conversion, checkout files and look at file endings in the working\n> directory.\n>\n> $ rm with*\n> $ ls -la\n> total 8\n> d---------+ 1 Stefan None 0 Jan 23 02:31 .\n> d---------+ 1 Stefan None 0 Jan 23 02:10 ..\n> d---------+ 1 Stefan None 0 Jan 23 02:22 .git\n> $ git status\n> # On branch master\n> # Changes not staged for commit:\n> #   (use \"git add/rm <file>...\" to update what will be committed)\n> #   (use \"git checkout -- <file>...\" to discard changes in working \n> directory)\n> #\n> #       deleted:    withcrlf.txt\n> #       deleted:    withlf.txt\n> #\n> no changes added to commit (use \"git add\" and/or \"git commit -a\")\n> $ git config --global core.autocrlf false\n> $ git config --global core.autocrlf\n> false\n> $ git checkout -- with*\n> $ ls -la\n> total 10\n> d---------+ 1 Stefan None 0 Jan 23 02:38 .\n> d---------+ 1 Stefan None 0 Jan 23 02:10 ..\n> d---------+ 1 Stefan None 0 Jan 23 02:38 .git\n> ----------+ 1 Stefan None 2 Jan 23 02:38 withcrlf.txt\n> ----------+ 1 Stefan None 2 Jan 23 02:38 withlf.txt\n>\n> -- Both files in working directory files now have LF line endings\n> confirming that files in repository have LF file endings. Either the\n> output message of add and commit is wrong or the behavior of the EOL\n> conversion is wrong... or... have I missed something...?\n>\n>   /Stefan\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n>\n> -----\n> No virus found in this message.\n> Checked by AVG - www.avg.com\n> Version: 2013.0.2890 / Virus Database: 2639/6050 - Release Date: \n> 01/22/13\n> \n\n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n"},{"id":"207646","messageId":"CABPQNSaqFjvW6Kudc2uN3YWvrZuimN7MDWUeyjyG9vSZHD=C8g@mail.gmail.com","threadId":"32697","inReplyTo":"063ABD39C46D492391698E400A7D1FA9@PhilipOakley","subject":"Re: Re: Bug in EOL conversion?","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2013-01-23T22:36:56Z","receivedAt":"2013-01-23T22:36:56Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Jan 23, 2013 at 10:55 PM, Philip Oakley <philipoakley@iee.org> wrote:\n> The msysgit list msysgit@googlegroups.com may be a better place for this.\n>\n> It is likely that you have a windows specific EOL conversion set within the\n> wider config's (i.e.  --system, --global). You may have core.safecrlf set\n> which does a round trip test so tests the conversion both ways.\n\nThe default for core.safecrlf is \"warn\", so one does not need a\nsetting to get that warning.\n\n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n"},{"id":"207647","messageId":"87ehhb5xgg.fsf@pctrast.inf.ethz.ch","threadId":"32697","inReplyTo":"CANrZfmGXtKcB+i_xhNJELftRc1pC2TJKKhOieHm=5Qkni9OKrA@mail.gmail.com","subject":"Re: Bug in EOL conversion?","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2013-01-23T22:46:55Z","receivedAt":"2013-01-23T22:46:55Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Stefan Norgren <stefan.norgren@gmail.com> writes:\n\n> $ git add *\n> warning: LF will be replaced by CRLF in withlf.txt.\n> The file will have its original line endings in your working directory.\n[...]\n> $ ls -la\n> total 10\n> d---------+ 1 Stefan None 0 Jan 23 02:12 .\n> d---------+ 1 Stefan None 0 Jan 23 02:10 ..\n> d---------+ 1 Stefan None 0 Jan 23 02:22 .git\n> ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt\n> ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt\n[...]\n> $ git ls-tree -l HEAD withcrlf.txt\n> 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d       2    withcrlf.txt\n> $ git ls-tree -l HEAD withlf.txt\n> 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d       2    withlf.txt\n\nIsn't that what would be expected?  It's a combination of\n\n- the canonical representation of a newline is LF, so the repository\n  stores LF\n\n- with safecrlf, checkout converts LF->CRLF and add converts CRLF->LF\n\nSo from the user's POV, running\n\n  git add withlf.txt\n  rm withlf.txt\n  git checkout -- withlf.txt\n\nwould appear to replace LF with CRLF in the worktree.  That's what the\nmessage says.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"207648","messageId":"97b95a2c-1c51-48b9-aff7-33af35b4f049@googlegroups.com","threadId":"32697","inReplyTo":"063ABD39C46D492391698E400A7D1FA9@PhilipOakley","subject":"Re: Bug in EOL conversion?","fromName":"Pēteris Kļaviņš","fromEmail":"p.klavins@gmail.com","sentAt":"2013-01-23T23:04:38Z","receivedAt":"2013-01-23T23:04:38Z","isPatch":false,"sender":{"key":"p.klavins@gmail.com","avatar":null},"body":"Hi Philip\n\nYou are mis-reading the warning. Git is acting as it does for the \nrecommended settings for Windows. The 'repository' under the .git directory \nALWAYS contains files with LF-only endings (unless you desperately override \nthe settings). The warning was telling you that when you were checking in \nthe file, it found that you have 'abnormal' line endings (for Windows) in \nthe file in your checkout (just LF endings) and so tried to be helpful in \nsaying that if someone else were to check the file out from your repository \non Windows, they would get CRLF in the file on checkout. But the warning \nsays 'the file will be checked in with CRLF' or similar because you are not \nsupposed to know that the repository actually strips the CR and stores the \nfile with LF-only. As you found out when you deleted the file and checked \nout a fresh copy, Git DID give you a copy of the file with CRLF endings, as \nhow it said it had stored it in the repository! This translation between \nCRLF on disk and LF-only in the repository is done so that the same set of \nfiles would have the same repository contents, regardless of whether they \nwere originally created on Windows or Linux. On Windows, files are normally \ncreated WITH CRLF endings, and on Linux with LF-only endings. In both \ncases, the same otherwise identical files would have identical, LF-only, \ncopies in the actual repository in the .git directory.\n\nPeter\n\nOn Wednesday, 23 January 2013 21:55:13 UTC, Philip Oakley wrote:\n>\n> The msysgit list msy...@googlegroups.com <javascript:> may be a better \n> place for \n> this. \n>\n> It is likely that you have a windows specific EOL conversion set within \n> the wider config's (i.e.  --system, --global). You may have \n> core.safecrlf set which does a round trip test so tests the conversion \n> both ways. \n>\n> The normal canonical line ending choice is LF in the repo. \n>\n> I don't have a W7 install to compare against. \n>\n> Philip \n>\n> ----- Original Message ----- \n> From: \"Stefan Norgren\" <stefan....@gmail.com <javascript:>> \n> To: <g...@vger.kernel.org <javascript:>> \n> Sent: Wednesday, January 23, 2013 2:44 AM \n> Subject: Bug in EOL conversion? \n>\n>\n> > Hi, \n> > \n> > The EOL conversion does not behave as indicated by output message from \n> > add and commit. Here is my test case executed on Windows 7 64 bit. \n> > \n> > \n> > $ git --version \n> > git version 1.8.0.msysgit.0 \n> > $ which git \n> > /cygdrive/c/Program Files (x86)/Git/cmd/git \n> > $ git config --list \n> > core.symlinks=false \n> > core.autocrlf=true \n> > color.diff=auto \n> > color.status=auto \n> > color.branch=auto \n> > color.interactive=true \n> > pack.packsizelimit=2g \n> > help.format=html \n> > http.sslcainfo=/bin/curl-ca-bundle.crt \n> > sendemail.smtpserver=/bin/msmtp.exe \n> > diff.astextplain.textconv=astextplain \n> > rebase.autosquash=true \n> > user.name=Stefan \n> > user.email=stefan@---.com \n> > core.repositoryformatversion=0 \n> > core.filemode=false \n> > core.bare=false \n> > core.logallrefupdates=true \n> > core.symlinks=false \n> > core.ignorecase=true \n> > core.hidedotfiles=dotGitOnly \n> > \n> > -- Note core.autocrlf=true. \n> > -- Created withcrlf.txt with one character and one CRLF line feed. \n> > File size 3 bytes. \n> > -- Created withlf.txt with one character and one LF line feed. File \n> > size 2 bytes. \n> > -- Now let's init repository. \n> > \n> > $ git init \n> > Initialized empty Git repository in D:/Dev/workspaces/gittest/.git/ \n> > $ ls -la \n> > total 10 \n> > d---------+ 1 Stefan None 0 Jan 23 02:12 . \n> > d---------+ 1 Stefan None 0 Jan 23 02:10 .. \n> > d---------+ 1 Stefan None 0 Jan 23 02:13 .git \n> > ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt \n> > ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt \n> > \n> > -- Note no .gitattributes file that will affect EOL conversion. \n> > \n> > $ ls -la .git/info/ \n> > total 5 \n> > d---------+ 1 Stefan None   0 Jan 23 02:12 . \n> > d---------+ 1 Stefan None   0 Jan 23 02:13 .. \n> > ----------+ 1 Stefan None 240 Jan 23 02:12 exclude \n> > \n> > -- Note no attribute file in .git/info/ that will affect EOL \n> > conversion. \n> > \n> > $ git add * \n> > warning: LF will be replaced by CRLF in withlf.txt. \n> > The file will have its original line endings in your working \n> > directory. \n> > $ git commit -m 'Testing EOL' \n> > [master (root-commit) 9a0b2f5] Testing EOL \n> > 2 files changed, 2 insertions(+) \n> > create mode 100644 withcrlf.txt \n> > create mode 100644 withlf.txt \n> > warning: LF will be replaced by CRLF in withlf.txt. \n> > The file will have its original line endings in your working \n> > directory. \n> > $ ls -la \n> > total 10 \n> > d---------+ 1 Stefan None 0 Jan 23 02:12 . \n> > d---------+ 1 Stefan None 0 Jan 23 02:10 .. \n> > d---------+ 1 Stefan None 0 Jan 23 02:22 .git \n> > ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt \n> > ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt \n> > \n> > -- So no changes (see file size) to files in working directory. This \n> > is expected and according to output warning from add and commit. \n> > \n> > -- Now lets look in the repository \n> > \n> > $ git ls-tree -l HEAD withcrlf.txt \n> > 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d       2 \n> > withcrlf.txt \n> > $ git ls-tree -l HEAD withlf.txt \n> > 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d       2 \n> > withlf.txt \n> > \n> > -- Note that size of withlf.txt is 2 in repository indicating that LF \n> > was not replaced by CRLF in withlf.txt as indicated in output from add \n> > and commit. Also note that size of withcrlf.txt is also 2 in \n> > repository so it looks like CRLF was replaced by LF in withcrlf.txt. \n> > To verify I will delete the files from working directory, turn off EOL \n> > conversion, checkout files and look at file endings in the working \n> > directory. \n> > \n> > $ rm with* \n> > $ ls -la \n> > total 8 \n> > d---------+ 1 Stefan None 0 Jan 23 02:31 . \n> > d---------+ 1 Stefan None 0 Jan 23 02:10 .. \n> > d---------+ 1 Stefan None 0 Jan 23 02:22 .git \n> > $ git status \n> > # On branch master \n> > # Changes not staged for commit: \n> > #   (use \"git add/rm <file>...\" to update what will be committed) \n> > #   (use \"git checkout -- <file>...\" to discard changes in working \n> > directory) \n> > # \n> > #       deleted:    withcrlf.txt \n> > #       deleted:    withlf.txt \n> > # \n> > no changes added to commit (use \"git add\" and/or \"git commit -a\") \n> > $ git config --global core.autocrlf false \n> > $ git config --global core.autocrlf \n> > false \n> > $ git checkout -- with* \n> > $ ls -la \n> > total 10 \n> > d---------+ 1 Stefan None 0 Jan 23 02:38 . \n> > d---------+ 1 Stefan None 0 Jan 23 02:10 .. \n> > d---------+ 1 Stefan None 0 Jan 23 02:38 .git \n> > ----------+ 1 Stefan None 2 Jan 23 02:38 withcrlf.txt \n> > ----------+ 1 Stefan None 2 Jan 23 02:38 withlf.txt \n> > \n> > -- Both files in working directory files now have LF line endings \n> > confirming that files in repository have LF file endings. Either the \n> > output message of add and commit is wrong or the behavior of the EOL \n> > conversion is wrong... or... have I missed something...? \n> > \n> >   /Stefan \n> > -- \n> > To unsubscribe from this list: send the line \"unsubscribe git\" in \n> > the body of a message to majo...@vger.kernel.org <javascript:> \n> > More majordomo info at  http://vger.kernel.org/majordomo-info.html \n> > \n> > \n> > ----- \n> > No virus found in this message. \n> > Checked by AVG - www.avg.com \n> > Version: 2013.0.2890 / Virus Database: 2639/6050 - Release Date: \n> > 01/22/13 \n> > \n>\n>\n\n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n"},{"id":"207649","messageId":"6950538D893A45FF8C5986B3A64067C6@PhilipOakley","threadId":"32697","inReplyTo":"CABPQNSaqFjvW6Kudc2uN3YWvrZuimN7MDWUeyjyG9vSZHD=C8g@mail.gmail.com","subject":"Re: Re: Bug in EOL conversion?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2013-01-23T23:04:38Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Erik Faye-Lund\" <kusmabite@gmail.com>\nSent: Wednesday, January 23, 2013 10:36 PM\n> On Wed, Jan 23, 2013 at 10:55 PM, Philip Oakley <philipoakley@iee.org> \n> wrote:\n>> The msysgit list msysgit@googlegroups.com may be a better place for \n>> this.\n>>\n>> It is likely that you have a windows specific EOL conversion set \n>> within the\n>> wider config's (i.e.  --system, --global). You may have core.safecrlf \n>> set\n>> which does a round trip test so tests the conversion both ways.\n>\n> The default for core.safecrlf is \"warn\", so one does not need a\n> setting to get that warning.\n>\n\nThank you confirming the Git for Windows default, which I don't believe \nStefan had realised was active.\n\nI had responded to Stefan's original 'bug' report as no one had picked \nup on it, and suspected it (core.safecrlf ) was set in Git for Windows, \nthough wasn't able to immediately check it myself.\n\nI did not think it was a bug at all, merely a misunderstanding by Stefan \nabout the safety features within Git (for Windows). \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n"}]}