Subject: Re: [bug-diffutils] bug#17075: diff - - exits immediately

From: Paul Eggert <[email-masked]>
Date: Sun, 23 Mar 2014 14:47:13 -0700

Karl Berry wrote:
> It seems like it should either read stdin twice (probably too much
> trouble), or read stdin once and then abort when it can't be read again,
> or just abort immediately.  Or something, just not success.

I don't see why 'diff' should be prohibited from optimizing the case 
'diff A A'.  'diff' should be allowed to read 'A' just once (or even not 
at all, which is what 'diff' actually does).  '-' is just a special case 
of this.