Re: Cannot checkout after setting the eol attribute

2017-08-23 Thread Ben Boeckel
On Wed, Aug 23, 2017 at 21:43:15 +0200, Torsten Bögershausen wrote: > git reset does it's job - please see below. > > The problem is that we need a "git commit" here. > After applying .gitattributes, it may be neccessary to "normalize" the > files. If there is something in the documentation, that

Re: Cannot checkout after setting the eol attribute

2017-08-23 Thread Torsten Bögershausen
On Tue, Aug 22, 2017 at 03:44:41PM -0400, Ben Boeckel wrote: > On Tue, Aug 22, 2017 at 21:13:18 +0200, Torsten Bögershausen wrote: > > When you set the text attribute (in your case "eol=crlf" implies text) > > then the file(s) -must- be nomalized and commited so that they have LF > > in the repo (t

Re: Cannot checkout after setting the eol attribute

2017-08-22 Thread Junio C Hamano
Torsten Bögershausen writes: > The following would solve your problem: >git init >echo $'dos\r' > dos >git add dos >git commit -m "dos newlines" >echo "dos -crlf" > .gitattributes >git add .gitattributes >git commit -m "add attributes" >echo "dos eol=crlf" > .gitat

Re: Cannot checkout after setting the eol attribute

2017-08-22 Thread Ben Boeckel
On Tue, Aug 22, 2017 at 21:13:18 +0200, Torsten Bögershausen wrote: > When you set the text attribute (in your case "eol=crlf" implies text) > then the file(s) -must- be nomalized and commited so that they have LF > in the repo (technically speaking the index) This seems like a special case that G

Re: Cannot checkout after setting the eol attribute

2017-08-22 Thread Torsten Bögershausen
On Tue, Aug 22, 2017 at 01:49:18PM -0400, Ben Boeckel wrote: > Hi, > > I specified the `eol` attribute on some files recently and the behavior > of Git is very strange. > > Here is the set of commands to set up the repository used for the > discussion: > > git init > echo $'dos\r' > dos

Cannot checkout after setting the eol attribute

2017-08-22 Thread Ben Boeckel
Hi, I specified the `eol` attribute on some files recently and the behavior of Git is very strange. Here is the set of commands to set up the repository used for the discussion: git init echo $'dos\r' > dos git add dos git commit -m "dos newlines" echo "dos -crlf" > .gitattri