Author: delphij
Date: Thu Aug 19 22:55:17 2010
New Revision: 211519
URL: http://svn.freebsd.org/changeset/base/211519

Log:
  Revert a minor part of revision 211364:
  
   - Imply -h if single file is grepped, this is the GNU behaviour
  
  This is already done by code above the change and have caused a regression
  since this instance of code does not check Hflag.
  
  Reported by:  davidxu
  Pointy hat to:        delphij

Modified:
  head/usr.bin/grep/grep.c

Modified: head/usr.bin/grep/grep.c
==============================================================================
--- head/usr.bin/grep/grep.c    Thu Aug 19 22:37:43 2010        (r211518)
+++ head/usr.bin/grep/grep.c    Thu Aug 19 22:55:17 2010        (r211519)
@@ -681,15 +681,12 @@ main(int argc, char *argv[])
 
        if (dirbehave == DIR_RECURSE)
                c = grep_tree(aargv);
-       else {
-               if (aargc == 1)
-                       hflag = true;
+       else
                for (c = 0; aargc--; ++aargv) {
                        if ((finclude || fexclude) && !file_matching(*aargv))
                                continue;
                        c+= procfile(*aargv);
                }
-       }
 
 #ifndef WITHOUT_NLS
        catclose(catalog);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to