1

I have changed line of a sql file file. But the diff only shows the diff colour without any change code. the line is: @enabled=0, before the change we had 1 instead of 0.

without the gitattribute

*.sql text diff

I get the error message that file suppressed by a .gitattributes entry or the file's encoding is unsupported.

[this is the link of the image of my git diff] (https://i.stack.imgur.com/bgMvv.png)

torek
  • 448,244
  • 59
  • 642
  • 775
O98
  • 13
  • 4
  • Is the file stored as UTF-8, or as UTF-16-LE (as Windows does)? Though if it is UTF-16-LE it's a bit surprising that you can see anything at all. – torek Dec 02 '22 at 20:13
  • Thanks, it was indeed an encoding problem! – O98 Dec 03 '22 at 11:02
  • @O98 Well spotted. I have edited the answer to illustrate how you can see encoding differences between two version of a file. – VonC Dec 09 '22 at 16:21

1 Answers1

0

You need to check your git status (assuming the @enabled=0 was done on your workstation)

Check if:

  • the file is indeed Test/Scripts/ScriptsIgnoredOnImport.sql
  • there is any local commit which would not have been pushed yet.

The file on GitHub can also tell you more, by typing b (which triggers the file "blame" view on GitHub).
As shown here, you can then "View blame prior to this change" and see if your @enabled= was visible then.


As noted by torek, you could have a difference in encoding as well.
As I mentioned in "How do I determine file encoding?", you can (even in a simple CMD on Windows), check the encoding of your current file with:

git show :your/file.sql | file -
# compare it with the previous version
git show @~your/file.sql | file -
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250