"Philip Oakley" <philipoak...@iee.org> writes:
> You may find that there are 'end of line' differences between the
> commits in the server, and the commits you have locally, which after
> eol conversion, look identical, but the different eol strings makes
> the sha1's different.

Yes, it's usually the case when files look the same but the merge
program doesn't like them that there is an end-of-line problem.  Worse,
the *same file contents* can mean logically different things if one
version of the file is interpreted in one way in regard to line endings
and the other version is interpreted in a different way.

To start diagnosing the problem, the first thing is to extract the
hashes of the files as Git has them recorded.  Another is to get Git to
output the two files and you save them into two files.  Then use some
stupid program like cmp to check whether the files are *actually*
byte-by-byte identical.  (When you're having problems like this, avoid
using any "intelligent" file comparison program, because such programs
often apply their own interpretation to the files they handle -- 99% of
the time, it helps the user, but this is one of the 1% situations.)

Another thing to do is check out one of the commits, then manually run a
checksum program (e.g., sha1sum) on the file in question.  Then check
out the other commit, and manually run the checksum.  Are the checksums
the same?  Do they agree with the checksums Git has recorded for the
files in the commit objects?


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