* Bug in EOL conversion? @ 2013-01-23 2:44 Stefan Norgren 2013-01-23 21:55 ` Philip Oakley 2013-01-23 22:46 ` Thomas Rast 0 siblings, 2 replies; 6+ messages in thread From: Stefan Norgren @ 2013-01-23 2:44 UTC (permalink / raw To: git Hi, The EOL conversion does not behave as indicated by output message from add and commit. Here is my test case executed on Windows 7 64 bit. $ git --version git version 1.8.0.msysgit.0 $ which git /cygdrive/c/Program Files (x86)/Git/cmd/git $ git config --list core.symlinks=false core.autocrlf=true color.diff=auto color.status=auto color.branch=auto color.interactive=true pack.packsizelimit=2g help.format=html http.sslcainfo=/bin/curl-ca-bundle.crt sendemail.smtpserver=/bin/msmtp.exe diff.astextplain.textconv=astextplain rebase.autosquash=true user.name=Stefan user.email=stefan@---.com core.repositoryformatversion=0 core.filemode=false core.bare=false core.logallrefupdates=true core.symlinks=false core.ignorecase=true core.hidedotfiles=dotGitOnly -- Note core.autocrlf=true. -- Created withcrlf.txt with one character and one CRLF line feed. File size 3 bytes. -- Created withlf.txt with one character and one LF line feed. File size 2 bytes. -- Now let's init repository. $ git init Initialized empty Git repository in D:/Dev/workspaces/gittest/.git/ $ ls -la total 10 d---------+ 1 Stefan None 0 Jan 23 02:12 . d---------+ 1 Stefan None 0 Jan 23 02:10 .. d---------+ 1 Stefan None 0 Jan 23 02:13 .git ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt -- Note no .gitattributes file that will affect EOL conversion. $ ls -la .git/info/ total 5 d---------+ 1 Stefan None 0 Jan 23 02:12 . d---------+ 1 Stefan None 0 Jan 23 02:13 .. ----------+ 1 Stefan None 240 Jan 23 02:12 exclude -- Note no attribute file in .git/info/ that will affect EOL conversion. $ git add * warning: LF will be replaced by CRLF in withlf.txt. The file will have its original line endings in your working directory. $ git commit -m 'Testing EOL' [master (root-commit) 9a0b2f5] Testing EOL 2 files changed, 2 insertions(+) create mode 100644 withcrlf.txt create mode 100644 withlf.txt warning: LF will be replaced by CRLF in withlf.txt. The file will have its original line endings in your working directory. $ ls -la total 10 d---------+ 1 Stefan None 0 Jan 23 02:12 . d---------+ 1 Stefan None 0 Jan 23 02:10 .. d---------+ 1 Stefan None 0 Jan 23 02:22 .git ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt -- So no changes (see file size) to files in working directory. This is expected and according to output warning from add and commit. -- Now lets look in the repository $ git ls-tree -l HEAD withcrlf.txt 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2 withcrlf.txt $ git ls-tree -l HEAD withlf.txt 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2 withlf.txt -- Note that size of withlf.txt is 2 in repository indicating that LF was not replaced by CRLF in withlf.txt as indicated in output from add and commit. Also note that size of withcrlf.txt is also 2 in repository so it looks like CRLF was replaced by LF in withcrlf.txt. To verify I will delete the files from working directory, turn off EOL conversion, checkout files and look at file endings in the working directory. $ rm with* $ ls -la total 8 d---------+ 1 Stefan None 0 Jan 23 02:31 . d---------+ 1 Stefan None 0 Jan 23 02:10 .. d---------+ 1 Stefan None 0 Jan 23 02:22 .git $ git status # On branch master # Changes not staged for commit: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # deleted: withcrlf.txt # deleted: withlf.txt # no changes added to commit (use "git add" and/or "git commit -a") $ git config --global core.autocrlf false $ git config --global core.autocrlf false $ git checkout -- with* $ ls -la total 10 d---------+ 1 Stefan None 0 Jan 23 02:38 . d---------+ 1 Stefan None 0 Jan 23 02:10 .. d---------+ 1 Stefan None 0 Jan 23 02:38 .git ----------+ 1 Stefan None 2 Jan 23 02:38 withcrlf.txt ----------+ 1 Stefan None 2 Jan 23 02:38 withlf.txt -- Both files in working directory files now have LF line endings confirming that files in repository have LF file endings. Either the output message of add and commit is wrong or the behavior of the EOL conversion is wrong... or... have I missed something...? /Stefan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug in EOL conversion? 2013-01-23 2:44 Bug in EOL conversion? Stefan Norgren @ 2013-01-23 21:55 ` Philip Oakley 2013-01-23 22:36 ` Erik Faye-Lund 2013-01-23 23:04 ` Pēteris Kļaviņš 2013-01-23 22:46 ` Thomas Rast 1 sibling, 2 replies; 6+ messages in thread From: Philip Oakley @ 2013-01-23 21:55 UTC (permalink / raw To: Stefan Norgren, git; +Cc: Git MsysGit The msysgit list msysgit@googlegroups.com may be a better place for this. It is likely that you have a windows specific EOL conversion set within the wider config's (i.e. --system, --global). You may have core.safecrlf set which does a round trip test so tests the conversion both ways. The normal canonical line ending choice is LF in the repo. I don't have a W7 install to compare against. Philip ----- Original Message ----- From: "Stefan Norgren" <stefan.norgren@gmail.com> To: <git@vger.kernel.org> Sent: Wednesday, January 23, 2013 2:44 AM Subject: Bug in EOL conversion? > Hi, > > The EOL conversion does not behave as indicated by output message from > add and commit. Here is my test case executed on Windows 7 64 bit. > > > $ git --version > git version 1.8.0.msysgit.0 > $ which git > /cygdrive/c/Program Files (x86)/Git/cmd/git > $ git config --list > core.symlinks=false > core.autocrlf=true > color.diff=auto > color.status=auto > color.branch=auto > color.interactive=true > pack.packsizelimit=2g > help.format=html > http.sslcainfo=/bin/curl-ca-bundle.crt > sendemail.smtpserver=/bin/msmtp.exe > diff.astextplain.textconv=astextplain > rebase.autosquash=true > user.name=Stefan > user.email=stefan@---.com > core.repositoryformatversion=0 > core.filemode=false > core.bare=false > core.logallrefupdates=true > core.symlinks=false > core.ignorecase=true > core.hidedotfiles=dotGitOnly > > -- Note core.autocrlf=true. > -- Created withcrlf.txt with one character and one CRLF line feed. > File size 3 bytes. > -- Created withlf.txt with one character and one LF line feed. File > size 2 bytes. > -- Now let's init repository. > > $ git init > Initialized empty Git repository in D:/Dev/workspaces/gittest/.git/ > $ ls -la > total 10 > d---------+ 1 Stefan None 0 Jan 23 02:12 . > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > d---------+ 1 Stefan None 0 Jan 23 02:13 .git > ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt > ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt > > -- Note no .gitattributes file that will affect EOL conversion. > > $ ls -la .git/info/ > total 5 > d---------+ 1 Stefan None 0 Jan 23 02:12 . > d---------+ 1 Stefan None 0 Jan 23 02:13 .. > ----------+ 1 Stefan None 240 Jan 23 02:12 exclude > > -- Note no attribute file in .git/info/ that will affect EOL > conversion. > > $ git add * > warning: LF will be replaced by CRLF in withlf.txt. > The file will have its original line endings in your working > directory. > $ git commit -m 'Testing EOL' > [master (root-commit) 9a0b2f5] Testing EOL > 2 files changed, 2 insertions(+) > create mode 100644 withcrlf.txt > create mode 100644 withlf.txt > warning: LF will be replaced by CRLF in withlf.txt. > The file will have its original line endings in your working > directory. > $ ls -la > total 10 > d---------+ 1 Stefan None 0 Jan 23 02:12 . > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > d---------+ 1 Stefan None 0 Jan 23 02:22 .git > ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt > ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt > > -- So no changes (see file size) to files in working directory. This > is expected and according to output warning from add and commit. > > -- Now lets look in the repository > > $ git ls-tree -l HEAD withcrlf.txt > 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2 > withcrlf.txt > $ git ls-tree -l HEAD withlf.txt > 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2 > withlf.txt > > -- Note that size of withlf.txt is 2 in repository indicating that LF > was not replaced by CRLF in withlf.txt as indicated in output from add > and commit. Also note that size of withcrlf.txt is also 2 in > repository so it looks like CRLF was replaced by LF in withcrlf.txt. > To verify I will delete the files from working directory, turn off EOL > conversion, checkout files and look at file endings in the working > directory. > > $ rm with* > $ ls -la > total 8 > d---------+ 1 Stefan None 0 Jan 23 02:31 . > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > d---------+ 1 Stefan None 0 Jan 23 02:22 .git > $ git status > # On branch master > # Changes not staged for commit: > # (use "git add/rm <file>..." to update what will be committed) > # (use "git checkout -- <file>..." to discard changes in working > directory) > # > # deleted: withcrlf.txt > # deleted: withlf.txt > # > no changes added to commit (use "git add" and/or "git commit -a") > $ git config --global core.autocrlf false > $ git config --global core.autocrlf > false > $ git checkout -- with* > $ ls -la > total 10 > d---------+ 1 Stefan None 0 Jan 23 02:38 . > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > d---------+ 1 Stefan None 0 Jan 23 02:38 .git > ----------+ 1 Stefan None 2 Jan 23 02:38 withcrlf.txt > ----------+ 1 Stefan None 2 Jan 23 02:38 withlf.txt > > -- Both files in working directory files now have LF line endings > confirming that files in repository have LF file endings. Either the > output message of add and commit is wrong or the behavior of the EOL > conversion is wrong... or... have I missed something...? > > /Stefan > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2013.0.2890 / Virus Database: 2639/6050 - Release Date: > 01/22/13 > -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: Bug in EOL conversion? 2013-01-23 21:55 ` Philip Oakley @ 2013-01-23 22:36 ` Erik Faye-Lund 2013-01-23 23:32 ` Philip Oakley 2013-01-23 23:04 ` Pēteris Kļaviņš 1 sibling, 1 reply; 6+ messages in thread From: Erik Faye-Lund @ 2013-01-23 22:36 UTC (permalink / raw To: Philip Oakley; +Cc: Stefan Norgren, git, Git MsysGit On Wed, Jan 23, 2013 at 10:55 PM, Philip Oakley <philipoakley@iee.org> wrote: > The msysgit list msysgit@googlegroups.com may be a better place for this. > > It is likely that you have a windows specific EOL conversion set within the > wider config's (i.e. --system, --global). You may have core.safecrlf set > which does a round trip test so tests the conversion both ways. The default for core.safecrlf is "warn", so one does not need a setting to get that warning. -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: Bug in EOL conversion? 2013-01-23 22:36 ` Erik Faye-Lund @ 2013-01-23 23:32 ` Philip Oakley 0 siblings, 0 replies; 6+ messages in thread From: Philip Oakley @ 2013-01-23 23:32 UTC (permalink / raw To: kusmabite; +Cc: Stefan Norgren, git, Git MsysGit From: "Erik Faye-Lund" <kusmabite@gmail.com> Sent: Wednesday, January 23, 2013 10:36 PM > On Wed, Jan 23, 2013 at 10:55 PM, Philip Oakley <philipoakley@iee.org> > wrote: >> The msysgit list msysgit@googlegroups.com may be a better place for >> this. >> >> It is likely that you have a windows specific EOL conversion set >> within the >> wider config's (i.e. --system, --global). You may have core.safecrlf >> set >> which does a round trip test so tests the conversion both ways. > > The default for core.safecrlf is "warn", so one does not need a > setting to get that warning. > Thank you confirming the Git for Windows default, which I don't believe Stefan had realised was active. I had responded to Stefan's original 'bug' report as no one had picked up on it, and suspected it (core.safecrlf ) was set in Git for Windows, though wasn't able to immediately check it myself. I did not think it was a bug at all, merely a misunderstanding by Stefan about the safety features within Git (for Windows). -- -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug in EOL conversion? 2013-01-23 21:55 ` Philip Oakley 2013-01-23 22:36 ` Erik Faye-Lund @ 2013-01-23 23:04 ` Pēteris Kļaviņš 1 sibling, 0 replies; 6+ messages in thread From: Pēteris Kļaviņš @ 2013-01-23 23:04 UTC (permalink / raw To: msysgit; +Cc: Stefan Norgren, git, Philip Oakley [-- Attachment #1: Type: text/plain, Size: 8101 bytes --] Hi Philip You are mis-reading the warning. Git is acting as it does for the recommended settings for Windows. The 'repository' under the .git directory ALWAYS contains files with LF-only endings (unless you desperately override the settings). The warning was telling you that when you were checking in the file, it found that you have 'abnormal' line endings (for Windows) in the file in your checkout (just LF endings) and so tried to be helpful in saying that if someone else were to check the file out from your repository on Windows, they would get CRLF in the file on checkout. But the warning says 'the file will be checked in with CRLF' or similar because you are not supposed to know that the repository actually strips the CR and stores the file with LF-only. As you found out when you deleted the file and checked out a fresh copy, Git DID give you a copy of the file with CRLF endings, as how it said it had stored it in the repository! This translation between CRLF on disk and LF-only in the repository is done so that the same set of files would have the same repository contents, regardless of whether they were originally created on Windows or Linux. On Windows, files are normally created WITH CRLF endings, and on Linux with LF-only endings. In both cases, the same otherwise identical files would have identical, LF-only, copies in the actual repository in the .git directory. Peter On Wednesday, 23 January 2013 21:55:13 UTC, Philip Oakley wrote: > > The msysgit list msy...@googlegroups.com <javascript:> may be a better > place for > this. > > It is likely that you have a windows specific EOL conversion set within > the wider config's (i.e. --system, --global). You may have > core.safecrlf set which does a round trip test so tests the conversion > both ways. > > The normal canonical line ending choice is LF in the repo. > > I don't have a W7 install to compare against. > > Philip > > ----- Original Message ----- > From: "Stefan Norgren" <stefan....@gmail.com <javascript:>> > To: <g...@vger.kernel.org <javascript:>> > Sent: Wednesday, January 23, 2013 2:44 AM > Subject: Bug in EOL conversion? > > > > Hi, > > > > The EOL conversion does not behave as indicated by output message from > > add and commit. Here is my test case executed on Windows 7 64 bit. > > > > > > $ git --version > > git version 1.8.0.msysgit.0 > > $ which git > > /cygdrive/c/Program Files (x86)/Git/cmd/git > > $ git config --list > > core.symlinks=false > > core.autocrlf=true > > color.diff=auto > > color.status=auto > > color.branch=auto > > color.interactive=true > > pack.packsizelimit=2g > > help.format=html > > http.sslcainfo=/bin/curl-ca-bundle.crt > > sendemail.smtpserver=/bin/msmtp.exe > > diff.astextplain.textconv=astextplain > > rebase.autosquash=true > > user.name=Stefan > > user.email=stefan@---.com > > core.repositoryformatversion=0 > > core.filemode=false > > core.bare=false > > core.logallrefupdates=true > > core.symlinks=false > > core.ignorecase=true > > core.hidedotfiles=dotGitOnly > > > > -- Note core.autocrlf=true. > > -- Created withcrlf.txt with one character and one CRLF line feed. > > File size 3 bytes. > > -- Created withlf.txt with one character and one LF line feed. File > > size 2 bytes. > > -- Now let's init repository. > > > > $ git init > > Initialized empty Git repository in D:/Dev/workspaces/gittest/.git/ > > $ ls -la > > total 10 > > d---------+ 1 Stefan None 0 Jan 23 02:12 . > > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > > d---------+ 1 Stefan None 0 Jan 23 02:13 .git > > ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt > > ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt > > > > -- Note no .gitattributes file that will affect EOL conversion. > > > > $ ls -la .git/info/ > > total 5 > > d---------+ 1 Stefan None 0 Jan 23 02:12 . > > d---------+ 1 Stefan None 0 Jan 23 02:13 .. > > ----------+ 1 Stefan None 240 Jan 23 02:12 exclude > > > > -- Note no attribute file in .git/info/ that will affect EOL > > conversion. > > > > $ git add * > > warning: LF will be replaced by CRLF in withlf.txt. > > The file will have its original line endings in your working > > directory. > > $ git commit -m 'Testing EOL' > > [master (root-commit) 9a0b2f5] Testing EOL > > 2 files changed, 2 insertions(+) > > create mode 100644 withcrlf.txt > > create mode 100644 withlf.txt > > warning: LF will be replaced by CRLF in withlf.txt. > > The file will have its original line endings in your working > > directory. > > $ ls -la > > total 10 > > d---------+ 1 Stefan None 0 Jan 23 02:12 . > > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > > d---------+ 1 Stefan None 0 Jan 23 02:22 .git > > ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt > > ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt > > > > -- So no changes (see file size) to files in working directory. This > > is expected and according to output warning from add and commit. > > > > -- Now lets look in the repository > > > > $ git ls-tree -l HEAD withcrlf.txt > > 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2 > > withcrlf.txt > > $ git ls-tree -l HEAD withlf.txt > > 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2 > > withlf.txt > > > > -- Note that size of withlf.txt is 2 in repository indicating that LF > > was not replaced by CRLF in withlf.txt as indicated in output from add > > and commit. Also note that size of withcrlf.txt is also 2 in > > repository so it looks like CRLF was replaced by LF in withcrlf.txt. > > To verify I will delete the files from working directory, turn off EOL > > conversion, checkout files and look at file endings in the working > > directory. > > > > $ rm with* > > $ ls -la > > total 8 > > d---------+ 1 Stefan None 0 Jan 23 02:31 . > > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > > d---------+ 1 Stefan None 0 Jan 23 02:22 .git > > $ git status > > # On branch master > > # Changes not staged for commit: > > # (use "git add/rm <file>..." to update what will be committed) > > # (use "git checkout -- <file>..." to discard changes in working > > directory) > > # > > # deleted: withcrlf.txt > > # deleted: withlf.txt > > # > > no changes added to commit (use "git add" and/or "git commit -a") > > $ git config --global core.autocrlf false > > $ git config --global core.autocrlf > > false > > $ git checkout -- with* > > $ ls -la > > total 10 > > d---------+ 1 Stefan None 0 Jan 23 02:38 . > > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > > d---------+ 1 Stefan None 0 Jan 23 02:38 .git > > ----------+ 1 Stefan None 2 Jan 23 02:38 withcrlf.txt > > ----------+ 1 Stefan None 2 Jan 23 02:38 withlf.txt > > > > -- Both files in working directory files now have LF line endings > > confirming that files in repository have LF file endings. Either the > > output message of add and commit is wrong or the behavior of the EOL > > conversion is wrong... or... have I missed something...? > > > > /Stefan > > -- > > To unsubscribe from this list: send the line "unsubscribe git" in > > the body of a message to majo...@vger.kernel.org <javascript:> > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > > ----- > > No virus found in this message. > > Checked by AVG - www.avg.com > > Version: 2013.0.2890 / Virus Database: 2639/6050 - Release Date: > > 01/22/13 > > > > -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en [-- Attachment #2: Type: text/html, Size: 9918 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug in EOL conversion? 2013-01-23 2:44 Bug in EOL conversion? Stefan Norgren 2013-01-23 21:55 ` Philip Oakley @ 2013-01-23 22:46 ` Thomas Rast 1 sibling, 0 replies; 6+ messages in thread From: Thomas Rast @ 2013-01-23 22:46 UTC (permalink / raw To: Stefan Norgren; +Cc: git Stefan Norgren <stefan.norgren@gmail.com> writes: > $ git add * > warning: LF will be replaced by CRLF in withlf.txt. > The file will have its original line endings in your working directory. [...] > $ ls -la > total 10 > d---------+ 1 Stefan None 0 Jan 23 02:12 . > d---------+ 1 Stefan None 0 Jan 23 02:10 .. > d---------+ 1 Stefan None 0 Jan 23 02:22 .git > ----------+ 1 Stefan None 3 Jan 23 01:55 withcrlf.txt > ----------+ 1 Stefan None 2 Jan 23 01:55 withlf.txt [...] > $ git ls-tree -l HEAD withcrlf.txt > 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2 withcrlf.txt > $ git ls-tree -l HEAD withlf.txt > 100644 blob d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2 withlf.txt Isn't that what would be expected? It's a combination of - the canonical representation of a newline is LF, so the repository stores LF - with safecrlf, checkout converts LF->CRLF and add converts CRLF->LF So from the user's POV, running git add withlf.txt rm withlf.txt git checkout -- withlf.txt would appear to replace LF with CRLF in the worktree. That's what the message says. -- Thomas Rast trast@{inf,student}.ethz.ch ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-23 23:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-23 2:44 Bug in EOL conversion? Stefan Norgren 2013-01-23 21:55 ` Philip Oakley 2013-01-23 22:36 ` Erik Faye-Lund 2013-01-23 23:32 ` Philip Oakley 2013-01-23 23:04 ` Pēteris Kļaviņš 2013-01-23 22:46 ` Thomas Rast
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).