GNU bug report logs - #25499
[PATCH] grep: fix matching not longest pattern with grep -Fo

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Sat, 21 Jan 2017 09:16:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25499 in the body.
You can then email your comments to 25499 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#25499; Package grep. (Sat, 21 Jan 2017 09:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Norihiro Tanaka <noritnk <at> kcn.ne.jp>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Sat, 21 Jan 2017 09:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: <bug-grep <at> gnu.org>
Subject: [PATCH] grep: fix matching not longest pattern with grep -Fo
Date: Sat, 21 Jan 2017 18:14:48 +0900
[Message part 1 (text/plain, inline)]
grep -Fo may not match longest pattern in grep 2.26 or later including
current master.

$ printf 'abce\n' > in
$ printf 'abcd\nc\nbce\n' > pat
$ LC_ALL=C src/grep -Fof pat in
c

We expect "bce" in this case.
[0001-grep-fix-matching-not-longest-pattern-with-grep-Fo.patch (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#25499; Package grep. (Sat, 21 Jan 2017 16:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 25499 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: 25499 <at> debbugs.gnu.org
Subject: Re: bug#25499: [PATCH] grep: fix matching not longest pattern with
 grep -Fo
Date: Sat, 21 Jan 2017 08:09:00 -0800
[Message part 1 (text/plain, inline)]
On Sat, Jan 21, 2017 at 1:14 AM, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
> grep -Fo may not match longest pattern in grep 2.26 or later including
> current master.
>
> $ printf 'abce\n' > in
> $ printf 'abcd\nc\nbce\n' > pat
> $ LC_ALL=C src/grep -Fof pat in
> c
>
> We expect "bce" in this case.

Nice. I am glad you caught that.
I've adjusted some wording and will push this soon:
[grep-Fo-longest.diff (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#25499; Package grep. (Sun, 22 Jan 2017 01:10:01 GMT) Full text and rfc822 format available.

Message #11 received at 25499 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Jim Meyering <jim <at> meyering.net>
Cc: 25499 <at> debbugs.gnu.org
Subject: Re: bug#25499: [PATCH] grep: fix matching not longest pattern with
 grep -Fo
Date: Sun, 22 Jan 2017 10:09:10 +0900
On Sat, 21 Jan 2017 08:09:00 -0800
Jim Meyering <jim <at> meyering.net> wrote:

> Nice. I am glad you caught that.
> I've adjusted some wording and will push this soon:

Thanks for replying and adjusting quickly.  Your adjustment is also very
useful for me to learn English.





Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Sun, 22 Jan 2017 01:13:01 GMT) Full text and rfc822 format available.

Notification sent to Norihiro Tanaka <noritnk <at> kcn.ne.jp>:
bug acknowledged by developer. (Sun, 22 Jan 2017 01:13:02 GMT) Full text and rfc822 format available.

Message #16 received at 25499-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: 25499-done <at> debbugs.gnu.org
Subject: Re: bug#25499: [PATCH] grep: fix matching not longest pattern with
 grep -Fo
Date: Sat, 21 Jan 2017 17:11:50 -0800
On Sat, Jan 21, 2017 at 5:09 PM, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
>
> On Sat, 21 Jan 2017 08:09:00 -0800
> Jim Meyering <jim <at> meyering.net> wrote:
>
>> Nice. I am glad you caught that.
>> I've adjusted some wording and will push this soon:
>
> Thanks for replying and adjusting quickly.  Your adjustment is also very
> useful for me to learn English.

Pushed.




Information forwarded to bug-grep <at> gnu.org:
bug#25499; Package grep. (Mon, 23 Jan 2017 19:45:02 GMT) Full text and rfc822 format available.

Message #19 received at 25499-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: 25499-done <at> debbugs.gnu.org
Subject: Re: bug#25499: [PATCH] grep: fix matching not longest pattern with
 grep -Fo
Date: Mon, 23 Jan 2017 11:43:55 -0800
On Sat, Jan 21, 2017 at 5:11 PM, Jim Meyering <jim <at> meyering.net> wrote:
> On Sat, Jan 21, 2017 at 5:09 PM, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
>>
>> On Sat, 21 Jan 2017 08:09:00 -0800
>> Jim Meyering <jim <at> meyering.net> wrote:
>>
>>> Nice. I am glad you caught that.
>>> I've adjusted some wording and will push this soon:
>>
>> Thanks for replying and adjusting quickly.  Your adjustment is also very
>> useful for me to learn English.
>
> Pushed.

I've just noticed that fgrep-longest was not listed in Makefile.am's
lists of tests, so have added it with this:

  http://git.savannah.gnu.org/cgit/grep.git/commit/?id=b2e0f3f86c6ff948c9b37668af762ea90f06e401




Information forwarded to bug-grep <at> gnu.org:
bug#25499; Package grep. (Tue, 24 Jan 2017 15:01:02 GMT) Full text and rfc822 format available.

Message #22 received at 25499-done <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Jim Meyering <jim <at> meyering.net>
Cc: 25499-done <at> debbugs.gnu.org
Subject: Re: bug#25499: [PATCH] grep: fix matching not longest pattern with
 grep -Fo
Date: Wed, 25 Jan 2017 00:00:30 +0900
On Mon, 23 Jan 2017 11:43:55 -0800
Jim Meyering <jim <at> meyering.net> wrote:

> I've just noticed that fgrep-longest was not listed in Makefile.am's
> lists of tests, so have added it with this:
> 
>   http://git.savannah.gnu.org/cgit/grep.git/commit/?id=b2e0f3f86c6ff948c9b37668af762ea90f06e401

Thanks.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Feb 2017 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 202 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.