Subject: bug#16230: closed (pushed with s/TAB/spaces/ changes)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 23 Dec 2013 20:43:02 +0000

Your bug report

#16230: FYI: [PATCH] maint: fix/improve a comment

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
16230: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16230
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: pushed with s/TAB/spaces/ changes
From: Jim Meyering <[email-masked]>
To: [email-masked]
Date: Mon, 23 Dec 2013 12:42:07 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Subject: FYI: [PATCH] maint: fix/improve a comment
From: Jim Meyering <[email-masked]>
To: [email-masked]
Date: Mon, 23 Dec 2013 12:39:27 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

While the condition in mentioned guard was false for all tests run via
"make check", I constructed a case for which the if-block is actually
required.  I'll add an actual test after the upcoming  release.
From a69f71feaaf67d519f7ee75545ee73c1eb1843a5 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email-masked]>
Date: Mon, 23 Dec 2013 12:33:12 -0800
Subject: [PATCH] maint: fix/improve a comment

* src/main.c (prline): Replace untrue FIXME comment with one
telling how the hard-to-reach code can be exercised.
---
 src/main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 1dfbcb6..a7487df 100644
--- a/src/main.c
+++ b/src/main.c
@@ -937,9 +937,12 @@ prline (char const *beg, char const *lim, int sep)
       if (matching && (only_matching || *match_color))
         beg = print_line_middle (beg, lim, line_color, match_color);

-      /* FIXME: this test may be removable.  */
       if (!only_matching && *line_color)
-        beg = print_line_tail (beg, lim, line_color);
+	{
+	  /* This code is exercised at least when grep is invoked like this:
+	     echo k| GREP_COLORS='sl=01;32' src/grep k --color=always  */
+	  beg = print_line_tail (beg, lim, line_color);
+	}
     }

   if (!only_matching && lim > beg)
-- 
1.8.5.rc2.6.gc6f1b92