It depends on your diff
command. Mine (GNU diffutils 3.0) says:
An exit status of
0
means no differences were found,1
means some
differences were found, and2
means trouble. Normally, differing
binary files count as trouble, but this can be altered by using the
-a
or--text
option, or the-q
or--brief
option.