More generally, I'm not sure it's necessary or wise to describe exactly the optimizations 'diff' uses to avoid reading files. Quite possibly, though, I'm not understanding the problem that caused you to file the bug report in the first place.
I dunno, even that sounds dubious, as it's incomplete. For example,
when A and B are different files, 'diff -q A B' reads neither A nor B if
it determines via the 'stat' syscall that the files are different sizes.
- [bug-diffutils] bug#17075: diff - - exits immediately Karl Berry
- [bug-diffutils] bug#17075: bug#17075: diff - - exits imm... Paul Eggert
- [bug-diffutils] bug#17075: bug#17075: bug#17075: diff... Eric Blake
- [bug-diffutils] bug#17075: bug#17075: diff - - exits... Karl Berry
- [bug-diffutils] bug#17075: bug#17075: diff - - e... Paul Eggert
- [bug-diffutils] bug#17075: bug#17075: diff -... Karl Berry
- [bug-diffutils] bug#17075: bug#17075: d... Paul Eggert
- [bug-diffutils] bug#17075: bug#1707... Karl Berry
- [bug-diffutils] bug#17075: bug#... Paul Eggert
- [bug-diffutils] bug#17075: bug#... Karl Berry
- [bug-diffutils] bug#17075: bug#... Paul Eggert
- [bug-diffutils] bug#17075: bug#1707... Karl Berry
