On Wednesday, May 28, 2014 3:13:22 PM UTC-4, Philip Oakley wrote:
> Any idea what git diff is thinking is different or some suggestions on how 
> to find out?   Its not obvious from the diff output.  If I use difftool 
> kdiff3 reports the files are binary equal. 
> The EOL normalisation offereings in Git can be highly confusing, because 
> of backward compatibility options. IIUC the 'input=' option is the older 
> style,

My reference for this has been:
which I thought were pretty new.  The specific line(s) in the 
.gitattributes file are 

source/*.c text eol=crlf
source/*.h text eol=crlf

Is there a newer format than that?  I can't seem to find anything in the 
man pages.

In my git config:

autocrlf is false
core.eol is crlf 

> Finally, the EOL values that are baked into the history may not be what 
> you have been led to believe because of some default normalisation you 
> have. Try git cat-file to check.

The stuff in the repo looks to be as I expect.

$ git cat-file blob HEAD:source/main.c > main_repo.c
$ file main_repo.c 
main_repo.c: ASCII C program text, with CRLF line terminators
$ file main.c 
main.c: ASCII C program text, with CRLF line terminators
$ cmp main.c main_repo.c 
$ git diff --stat main.c
 source/main.c | 412 
 1 file changed, 206 insertions(+), 206 deletions(-) 

However, I see whats happening now... I used git diff --binary to see 
exactly what git thought the diff should be.  What I see is that git wants 
to replace all the crlf with just lf.  

This is the same sort of issue we had with autocrlf.  The docs seem to 
suggest that .gitattributes setup would let you have files stored int the 
repository as crlf but perhaps I just misunderstand.  Am I doing something 
wrong or is git going to always put lf in the repository when line 
normalization is active?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to