GNU bug report logs -
#17075
diff - - exits immediately
Previous Next
Reported by: karl <at> freefriends.org (Karl Berry)
Date: Sun, 23 Mar 2014 21:22:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 17075 <at> debbugs.gnu.org (full text, mbox):
though, I'm not understanding the problem that caused you to file the
bug report in the first place.
I was surprised that "diff - -" did not read stdin.
Sure, what I wrote is incomplete; completeness wasn't the goal (and
surely isn't desired). Avoiding user surprise was the goal.
Here is the one sentence in the manual which I think should be changed,
regardless of anything else:
As a special case, `diff - -' compares a copy of standard input to
itself.
I suppose some torturous interpretation could be made to consider that
technically not false, but the straightforward implication is that it
reads stdin. Even just deleting the sentence and replacing it with
nothing would be better than leaving it, seems to me.
But I think it would be better to say *something* about the fact that
diff does not always read its input, in the event that it can determine the
result via other methods. This is so unlike virtually every other
program, as we've discussed in this thread, that I think it deserves
mention. If it counts for anything, I've been using Unix for 30+ years
and have worked (a tiny bit) on the diff source, the diff manual, and tons
of other utilities, and I was *still* surprised.
best,
karl
This bug report was last modified 11 years and 108 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.