git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Rustad, Mark D" <mark.d.rustad@intel.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git grep broken in Fedora 21 update?
Date: Fri, 4 Sep 2015 10:03:45 -0400	[thread overview]
Message-ID: <20150904140345.GA28675@sigill.intra.peff.net> (raw)
In-Reply-To: <9CAA4751-D295-4ACE-8ED6-720D728D24EA@intel.com>

On Fri, Sep 04, 2015 at 12:04:38AM +0000, Rustad, Mark D wrote:

> You can see that git grep missed the line in ixgbe_x550.c that had two hits on the string.
> 
> This was with git 2.1.0 in Fedora 21. I use git grep a lot and never
> noticed a problem before. I just updated my Fedora 21 system
> yesterday, so I have to figure that has something to do with it. I
> checked and git didn't get updated, so I figure it must be a library
> that is really broken.
> 
> I see in my update log that pcre was updated to:
> 
> pcre.x86_64 0:8.35-12.fc21
> pcre-devel.x86_64 0:8.35-12.fc21
> 
> Yet the grep command is unaffected.

I don't think "git grep" should be using pcre unless you specified "-P"
on the command line (which might be an interesting experiment, to see if
it improves the result).

It shouldn't be affected by your working tree state. "git grep" without
arguments searches the working tree, just like grep. It might omit a
file that is not tracked, but given that the missing line is from a file
which _does_ have other results, that's clearly not the problem.

Is it possible that git _is_ producing the hit, but it is getting eaten
by the pager or something like that? Does "git --no-pager grep
enter_lplu" produce the same results?

I don't think there have been any git bugs in this area for quite a
while. In your position I'd try building from source to see if a freshly
built version has the same problem.

-Peff

  parent reply	other threads:[~2015-09-04 14:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04  0:04 git grep broken in Fedora 21 update? Rustad, Mark D
2015-09-04  4:55 ` Jacob Keller
2015-09-04 13:34   ` Michael J Gruber
2015-09-04 14:03 ` Jeff King [this message]
2015-09-04 16:18   ` Rustad, Mark D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150904140345.GA28675@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=mark.d.rustad@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).