1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

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
This commit is contained in:
Xin LI 2010-08-19 22:55:17 +00:00
parent 67a94de261
commit c38208ad5e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211519

View File

@ -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);