Limon Monte
Limon Monte

Reputation: 54389

GitHub - why two lines are marked as different without any visible differences?

Here's the commit cba438 on Github.

As you can see line #1 in index.html is marked as changed:

But as I can see there's no single changed character. Is it up to GitHub or Git? Is it a bug or some hidden character was changed?

Upvotes: 3

Views: 94

Answers (2)

user2404501
user2404501

Reputation:

Yes, there is a hidden character there, a UTF8 BOM.

$ git show cba438:index.html | od -c | head -1
0000000 357 273 277   <   !   d   o   c   t   y   p   e       h   t   m
$ git show cba438~1:index.html | od -c | head -1
0000000   <   !   d   o   c   t   y   p   e       h   t   m   l   >  \n

Related SO question: What's different between UTF-8 and UTF-8 without BOM?

Upvotes: 4

Idos
Idos

Reputation: 15310

enter image description here

Looks like a whitespace at the end of the deleted line.

Upvotes: 0

Related Questions