Thanks, closing this bug report as your patch was applied in June.

I followed up by installing the attached minor tweak, which should improve performance very slightly, to be about what it was earlier.
>From 5fa3eec02a417bd6b377e49a8d8658fdbfb492b6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Thu, 18 Aug 2016 23:12:10 -0700
Subject: [PATCH] grep: tune list_files conversion to enum

* src/grep.c (grepdesc): Use a slightly more-efficient way to test
list_files.
---
 src/grep.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/grep.c b/src/grep.c
index cc46919..f4d0444 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1853,8 +1853,7 @@ grepdesc (int desc, bool command_line)
     }
 
   status = !count;
-  if ((list_files == LISTFILES_MATCHING && count > 0)
-      || (list_files == LISTFILES_NONMATCHING && count == 0))
+  if (list_files == (status ? LISTFILES_NONMATCHING : LISTFILES_MATCHING))
     {
       print_filename ();
       putchar_errno ('\n' & filename_mask);
-- 
2.5.5

Reply via email to