All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rustad, Mark D" <mark.d.rustad@intel.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: git grep broken in Fedora 21 update?
Date: Fri, 4 Sep 2015 00:04:38 +0000	[thread overview]
Message-ID: <9CAA4751-D295-4ACE-8ED6-720D728D24EA@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]

I just found a case where grep and git grep yield different results. Inside the ixgbe directory of the Linux kernel I did:

$ grep enter_lplu *.[ch]

And got the following:

ixgbe_main.c:	if (adapter->hw.phy.ops.enter_lplu) {
ixgbe_main.c:		adapter->hw.phy.ops.enter_lplu(&adapter->hw);
ixgbe_type.h:	s32 (*enter_lplu)(struct ixgbe_hw *);
ixgbe_x550.c:/** ixgbe_enter_lplu_x550em - Transition to low power states
ixgbe_x550.c:static s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw)
ixgbe_x550.c:			phy->ops.enter_lplu = ixgbe_enter_lplu_t_x550em;

But when I did:

$ git grep enter_lplu

I got:

ixgbe_main.c:   if (adapter->hw.phy.ops.enter_lplu) {
ixgbe_main.c:           adapter->hw.phy.ops.enter_lplu(&adapter->hw);
ixgbe_type.h:   s32 (*enter_lplu)(struct ixgbe_hw *);
ixgbe_x550.c:/** ixgbe_enter_lplu_x550em - Transition to low power states
ixgbe_x550.c:static s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw)

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.

--
Mark Rustad, Networking Division, Intel Corporation


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 841 bytes --]

             reply	other threads:[~2015-09-04  0:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04  0:04 Rustad, Mark D [this message]
2015-09-04  4:55 ` git grep broken in Fedora 21 update? Jacob Keller
2015-09-04 13:34   ` Michael J Gruber
2015-09-04 14:03 ` Jeff King
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=9CAA4751-D295-4ACE-8ED6-720D728D24EA@intel.com \
    --to=mark.d.rustad@intel.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.