From 65183824861ca10f39e934d940c9be4b821f8f2a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 25 Mar 2014 17:55:26 -0700 Subject: [PATCH] doc: improve documentation about reading and stdin See Bug#17075. * doc/diffutils.texi (Comparison): Say that files need not be read. (Invoking diff): Remove confusing remark about 'diff - -'. It's not that useful, and it's not portable anyway. --- doc/diffutils.texi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/diffutils.texi b/doc/diffutils.texi index 7b08cd4..022fb8d 100644 --- a/doc/diffutils.texi +++ b/doc/diffutils.texi @@ -219,6 +219,11 @@ groups of lines that differ, and reports each group of differing lines. Its output is designed to make it easy to inspect two different sets of changes to the same file. +These commands compare input files without necessarily reading them. +For example, if @command{diff} is asked simply to report whether two +files differ, and it discovers that the files have different sizes, it +need not read them to do its job. + @menu * Hunks:: Groups of differing lines. * White Space:: Suppressing differences in white space. @@ -3672,8 +3677,7 @@ diff @address@hidden @address@hidden In the simplest case, two file names @var{from-file} and @var{to-file} are given, and @command{diff} compares the contents of @var{from-file} and @var{to-file}. A file name of @file{-} stands for -text read from the standard input. As a special case, @samp{diff - -} -compares a copy of standard input to itself. +the standard input. If one file is a directory and the other is not, @command{diff} compares the file in the directory whose name is that of the non-directory. -- 1.8.5.3